Jump to content

Element Data and markers problem :(


Recommended Posts

hi i tried to create a simple mission its work perfectly but when i add a protection timer that doesnt work and dont show any error or warning.

here the code.

me = getLocalPlayer();
marker1 = createMarker( 2292.7622070313, 2446.4018554688, 10.8203125 )
pedmision1 = createPed ( 120, 2295.7622070313, 2451.4018554688, 10.8203125 )
function pedLoad ( name )
createBlip ( 2292.7622070313, 2446.4018554688, 10.8203125, 52, 0, 0, 0, 255)
setElementData( me, "iniciom1", true );
end
addEventHandler ( "onResourceStart", getRootElement(), pedLoad )
 
function MarkerHit ( hitPlayer, matchingDimension )
if( getElementData( hitPlayer, "iniciom1" ) == true ) then -- checkea si el jugador puede hacer el jump
outputChatBox ( getPlayerName(hitPlayer) .. " ve a pixulandia y mata ese CONCHESUMADRE HIIM!!!" )
createBlip ( 2295.7622070313, 2451.4018554688, 10.8203125, 52, 0, 0, 0, 255)
pedmision2 = createPed ( 120, 2291.7622070313, 2451.4018554688, 10.8203125 )
setElementData( hitPlayer, "iniciom1", false ) -- deshabilita el jump
setTimer( setElementData, 60000, 1, hitPlayer, "iniciom1", true )-- timer, permite hacer que se pueda volver a saltar en 3 segundos.
end
end
addEventHandler ( "onClientMarkerHit", marker1, MarkerHit )

bye and sorry for the engilsh :D

Link to comment

Why it doesn't work? What happens when you use timer? "doesn't work" doesn't really help us. Tell us more, like nothing happens when you hit the marker? Marker doesn't show up? Please tell us more so we can find out where the problem is.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...