-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
You must edit the acl.xml with the server closed.
-
You could set the current vehicle model and set his position instead of creating a new one.
-
You can get the nearest vehicle to the player, then lock or unlock it.
-
Upload the resource to mediafire.com and post the link. P.S: You may want to try this resource: https://community.multitheftauto.com/ind ... ls&id=3016 it's a mod loader, you can easily replace skins/weapons/vehicles.
-
function beachTurf ( player ) local playerGang = getElementData ( player, "gang" ) if ( playerGang ) then if ( isTimer ( beachturfTimer ) ) then return end local r, g, b = unpack ( exports [ "gang_system" ]:getGangColor ( playerGang ) ) setRadarAreaFlashing ( beachTurfA, true ) exports ["guimessages"] : outputServer ( player, "You entered the turf!" , 255, 0, 0 ) beachturfTimer = setTimer ( function ( ) local beachTurfCplayers = getElementColShape ( beachTurfC ) local players = getElementsWithinColShape ( beachTurfC, "player" ) setRadarAreaColor ( beachTurfA, tonumber(r), tonumber(g), tonumber(b), 100 ) for _, player in ipairs ( players ) do exports ["guimessages"] : outputServer ( player, "Congratulations, your gang take this turf!" , 255, 0, 0 ) givePlayerMoney ( player, 2000 ) end setRadarAreaFlashing ( beachTurfA, false ) end ,10000, 1 ) end end addEventHandler ( "onColShapeHit", beachTurfC, beachTurf )
-
What do you mean? that all your vehicles are being multiplied?
-
Estas seguro de que pusiste el script para crear el fuego como client side en el meta.xml?
-
Lo pasado pisado, empezemos de nuevo y listo.
-
Bueno, mejoren su actitud, porque el solo posteo un cancion, si no les gusta, lo dicen de buena manera.
-
playSound3D That's what you want?
-
That's because "v" and "vehicle" is not defined, also, I don't see why you need to loop all vehicles, you can just attach it to "root". addEventHandler ( "onVehicleEnter", root, function ( player ) setVehicleEngineState ( source, getElementData ( source, "vehicle.engine" ) ) end ) addEventHandler ( "onVehicleExit", root, function ( player ) setVehicleEngineState ( source, getElementData ( source, "vehicle.engine" ) ) end )
-
No, "players" is a table of elements, you must loop it.
-
getElementColShape -- To obtain marker colshape. getElementsWithinColShape -- To obtain a table with player elements inside colshape.
-
You forgot to pass the player argument here: beachturfTimer = setTimer ( function ( player ) setRadarAreaColor ( beachTurfA, tonumber(r), tonumber(g), tonumber(b), 100 ) exports ["guimessages"] : outputServer ( player, "Congratulations,your gang take this turf!" , 255, 0, 0 ) givePlayerMoney ( player, 2000 ) setRadarAreaFlashing ( beachTurfA, false ) end ,10000, 1 ) Like this: ,10000, 1, player
-
The problem is on the colshape, you set negative size, that made the colshape to create wrong. local beachTurfA = createRadarArea( 352.93, -2025.23, 58, 65, 255, 255, 255, 125 ) local beachTurfC = createColRectangle ( 352.93, -2025.23, 58, 65 ) function beachTurf ( player ) local playerGang = getElementData ( player, "gang" ) if ( playerGang ) then local r, g, b = unpack ( exports [ "gang_system" ]:getGangColor ( playerGang ) ) setRadarAreaFlashing ( beachTurfA, true ) exports ["guimessages"] : outputServer ( player, "You entered the turf!" , 255, 0, 0 ) beachturfTimer = setTimer ( function ( player ) setRadarAreaColor ( beachTurfA, tonumber(r), tonumber(g), tonumber(b), 100 ) exports ["guimessages"] : outputServer ( player, "Congratulations,your gang take this turf!" , 255, 0, 0 ) givePlayerMoney ( player, 2000 ) setRadarAreaFlashing ( beachTurfA, false ) end ,10000, 1 ) end end addEventHandler ( "onColShapeHit", beachTurfC, beachTurf )
-
Have you tried debugging your script to find out where the problem is?
-
And it doesn't say anything on chat box either?
-
function beachTurf ( player ) local playerGang = getElementData ( player, "gang" ) if ( playerGang ) then local r, g, b = unpack ( exports [ "gang_system" ]:getGangColor ( playerGang ) ) setRadarAreaFlashing ( beachTurfA, true ) exports ["guimessages"] : outputServer ( player, "You entered the turf!" , 255, 0, 0 ) beachturfTimer = setTimer ( function ( player ) setRadarAreaColor ( beachTurfA, tonumber(r), tonumber(g), tonumber(b), 100 ) exports ["guimessages"] : outputServer ( player, "Congratulations,your gang take this turf!" , 255, 0, 0 ) givePlayerMoney ( player, 2000 ) setRadarAreaFlashing ( beachTurfA, false ) end ,10000, 1 ) else outputChatBox ( "YOU ARE NOT IN A GANG!" ) end end addEventHandler ( "onColShapeHit", beachTurfC, beachTurf ) Try that and see what it outputs.
-
Errors on debugscript? did you set it client side on meta.xml?
-
getGangColor returns a table, you must unpack it. function beachTurf(player) if (getElementData( player, "gang" )) then local playerGang = getElementData( player, "gang" ) if (playerGang) then outputChatBox('executed', player, 255, 255, 255) else outputChatBox('failed',player,255,255,255) end local r, g, b = unpack ( exports [ "gang_system" ]:getGangColor ( playerGang ) ) setRadarAreaFlashing ( beachTurfA, true ) exports ["guimessages"] : outputServer ( player, "You entered the turf!" , 255, 0, 0 ) beachturfTimer = setTimer ( function(player) setRadarAreaColor ( beachTurfA, tonumber(r), tonumber(g), tonumber(b), 100 ) exports ["guimessages"] : outputServer ( player, "Congratulations,your gang take this turf!" , 255, 0, 0 ) givePlayerMoney ( player, 2000 ) setRadarAreaFlashing ( beachTurfA, false ) end, 10000, 1 ) end end addEventHandler ( "onColShapeHit", beachTurfC, beachTurf )
-
You're welcome.
-
"car" is not returning a vehicle element?
-
Does it work?