Jump to content

KariiiM

Members
  • Posts

    1,312
  • Joined

  • Last visited

Everything posted by KariiiM

  1. Victor, you can't do it with your case. @Gravestone, table.sort won't do what he wants to achieve, because this function will only do an alphabetical order. you can use Walid's way its good enough to do what you are looking for
  2. dxDrawText https://wiki.multitheftauto.com/wiki/DxDrawText
  3. Victor, can I know why you creating empty tables inside a table ? what's the purpose of that
  4. I wonder about those forums members who had helped in some functions development, did they used "Lua" or "C++" ?
  5. Nice news anyway you have my respect AND thank you for the updates, it is greatly appreciated.
  6. You need to use Lua to script in MTA
  7. If I'm not wrong, you can script a code for that
  8. Client files size has nothing to do with your FPS.. FPS is related to CPU
  9. NOTE: Code is server sided only. local safeZonesTable = { { x = 1578.2421875, y = 1801.248046875, z = 10.8203125, width = 58, depth = 61, height = 100 }, { x = 1996.958984375, y = -1450.9560546875, z = 13.5546875, width = 100, depth = 55, height = 100 }, { x = -2740.775390625, y = 577.9326171875, z = 14.5546875, width = 150, depth = 100, height = 100 } } local controls = { "fire", "next_weapon", "previous_weapon" } addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, zone in ipairs ( safeZonesTable ) do local safeZone = createColCuboid ( zone.x, zone.y, zone.z - 30, zone.width, zone.depth, zone.height ) createRadarArea ( zone.x, zone.y, zone.width, zone.depth, 0, 200, 0, 50 ) addEventHandler ( "onColShapeHit", safeZone, elementHitSafeZone ) addEventHandler ( "onColShapeLeave", safeZone, elementLeaveSafeZone ) end end ) function elementHitSafeZone ( theElement, mDim ) if ( not mDim ) then return end if isElement ( theElement ) then if ( getElementType ( theElement ) == "player" ) then for _, control in ipairs ( controls ) do toggleControl ( control, false ) end exports.GTWtopbar:dm ( "You entered the safezone, all weapons are forbidden.", theElement, 200, 50, 50 ) elseif ( getElementType ( theElement ) == "vehicle" ) then for _, control in ipairs ( controls ) do toggleControl ( control, false ) end exports.GTWvehicleshop:saveAndRemoveVehicle ( theElement, true ) local thePlayer = getVehicleController ( theElement ) if ( thePlayer ) then exports.GTWtopbar:dm ( "You can't drive vehicle inside safezone", thePlayer, 200, 50, 50 ) end end end end function elementLeaveSafeZone ( theElement, mDim ) if ( not mDim ) then return end if ( isElement ( theElement ) and getElementType ( theElement ) == "player" ) then for _, control in ipairs ( controls ) do toggleControl ( control, true ) end exports.GTWtopbar:dm ( "You left the safezone.", theElement, 200, 50, 50 ) end end I re made it for you, I coded it without testing it, so if you find any error, inform me here. and tell me the result after trying the code. good luck.
  10. I read the whole code, its totally messy, I would re make it for you but cant in this right moment
  11. You are coding a client code, so why you are using onPedWasted and onPlayerDamage events ? they are server sided events only which that mean they will not work in client side. Note: Client ( functions, events ) cannot be merged with Server side ( functions, events ).
  12. KariiiM

    Data and Wifi

    You cannot open your server ports with 3G, you need wifi router.
  13. KariiiM

    Car Rotators

    There is no big different in the loop speed
  14. KariiiM

    Car Rotators

    Why you guys using pairs in your loop and the index isn't a string, in this case use ipairs instead.
  15. Your words does not make any sense in my brain.
  16. Isn't that is a leaked gamemode ?
  17. We don't support the leaked resources.
  18. local mkl = createMarker ( 1274.0817871094, -1657.0938720703, 13.546875 ,"cylinder", 1.5, 0, 255, 0, 255 ) function createVehicleForPlayer ( thePlayer, _, vehicleModel ) local vehicleModel = tonumber ( vehicleModel ) local x ,y ,z = getElementPosition ( thePlayer ) --x = x + 5 adiciona 5 unidades na variável x local createdVehicle = createVehicle ( vehicleModel, x + 5, y, z ) if ( not createdVehicle ) then outputChatBox ( "Could not create the vehicle . The syntax is: /createvehicle [597]", thePlayer, 255, 0, 0 ) else outputChatBox ( "The vehicle was created successfully.", thePlayer, 0, 255, 0 ) end end
  19. so why you put on the title of the topic database problem since you have no idea ?
  20. The part of code that you need help with.
  21. I suggest you to go to your native language section, I'm sure you can explain your problem as well
×
×
  • Create New...