MR.S3D Posted January 6, 2012 Posted January 6, 2012 hi guys this my code server side local marker1 = createMarker(1525.3000488281,2834.3999023438,23.39999961853,"checkpoint",20,255,255,255,255) function marker(player) if (source == marker1) then local players = getElementsByType ( "player" ) timer = setTimer (function (player) if isPedInVehicle(player) then local veh = getPedOccupiedVehicle(player) if veh then destroyElement(veh) end end end ,1000,0, player) end end addEventHandler ("onMarkerHit",getRootElement(),marker) addEventHandler ("onMarkerLeave",getRootElement(),function() if (source == marker1) then if isTimer(timer) then killTimer(timer) end end end) this work onMarkerHit but when i leave the marker my Vehicle destroyed agin why ? please some one help me Welcom to my server Q.5 Current game type in my server Drift my Email : [email protected] Programming level: 90%
Xeno Posted January 6, 2012 Posted January 6, 2012 local marker1 = createMarker(1525.3000488281,2834.3999023438,23.39999961853,"checkpoint",20,255,255,255,255) function marker(player) if (source == marker1) then local players = getElementsByType ( "player" ) timer = setTimer (function (player) if isPedInVehicle(player) then local veh = getPedOccupiedVehicle(player) end end end ,1000,0, player) end end addEventHandler ("onMarkerHit",getRootElement(),marker) addEventHandler ("onMarkerLeave",getRootElement(),function() if (source == marker1) then if isTimer(timer) then killTimer(timer) end end end)
MR.S3D Posted January 6, 2012 Author Posted January 6, 2012 local marker1 = createMarker(1525.3000488281,2834.3999023438,23.39999961853,"checkpoint",20,255,255,255,255) function marker(player) if (source == marker1) then local players = getElementsByType ( "player" ) timer = setTimer (function (player) if isPedInVehicle(player) then local veh = getPedOccupiedVehicle(player) end end end ,1000,0, player) end end addEventHandler ("onMarkerHit",getRootElement(),marker) addEventHandler ("onMarkerLeave",getRootElement(),function() if (source == marker1) then if isTimer(timer) then killTimer(timer) end end end) not work Welcom to my server Q.5 Current game type in my server Drift my Email : [email protected] Programming level: 90%
Castillo Posted January 6, 2012 Posted January 6, 2012 local marker1 = createMarker(1525.3000488281,2834.3999023438,23.39999961853,"checkpoint",20,255,255,255,255) local timers = {} function marker(player) if (source == marker1) then timers[player] = setTimer (function (player) if isPedInVehicle(player) then local veh = getPedOccupiedVehicle(player) if veh then destroyElement(veh) end end end, 1000, 0, player) end end addEventHandler ("onMarkerHit",getRootElement(),marker) addEventHandler ("onMarkerLeave",getRootElement(),function(player) if (source == marker1) then if isTimer(timers[player]) then killTimer(timers[player]) end end end) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
MR.S3D Posted January 6, 2012 Author Posted January 6, 2012 Solidsnake14 this work thanks you so much Welcom to my server Q.5 Current game type in my server Drift my Email : [email protected] Programming level: 90%
Castillo Posted January 6, 2012 Posted January 6, 2012 You're welcome . San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now