capitanazop Posted August 2, 2009 Posted August 2, 2009 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
50p Posted August 2, 2009 Posted August 2, 2009 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.
DakiLLa Posted August 2, 2009 Posted August 2, 2009 may be it should be: addEventHandler ( "onClientResourceStart", getResourceRootElement( getThisResource() ), pedLoad ) cse as i can see its client side...
capitanazop Posted August 2, 2009 Author Posted August 2, 2009 the problem is doesnt create the markers and the peds .S EDIT: Thanks DAK! Now Work Perfectly !!!!
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