-
Posts
1,312 -
Joined
-
Last visited
Everything posted by KariiiM
-
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
-
Victor, can I know why you creating empty tables inside a table ? what's the purpose of that
-
I wonder about those forums members who had helped in some functions development, did they used "Lua" or "C++" ?
- 64 replies
-
- awesomeness
- mtasa 1.5.3
-
(and 4 more)
Tagged with:
-
Nice news anyway you have my respect AND thank you for the updates, it is greatly appreciated.
- 64 replies
-
- awesomeness
- mtasa 1.5.3
-
(and 4 more)
Tagged with:
-
Great updates, keep the great job...
- 37 replies
-
- public testing
- release announcement
- (and 4 more)
-
You need to use Lua to script in MTA
-
Restart your computer..
-
If I'm not wrong, you can script a code for that
-
Client files size has nothing to do with your FPS.. FPS is related to CPU
-
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.
-
I read the whole code, its totally messy, I would re make it for you but cant in this right moment
-
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 ).
-
You cannot open your server ports with 3G, you need wifi router.
-
There is no big different in the loop speed
-
Why you guys using pairs in your loop and the index isn't a string, in this case use ipairs instead.
-
Your words does not make any sense in my brain.
-
Isn't that is a leaked gamemode ?
-
We don't support the leaked resources.
-
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
-
so why you put on the title of the topic database problem since you have no idea ?
-
The part of code that you need help with.