Multi Posted October 19, 2013 Share Posted October 19, 2013 Welcome. My problem is that the script is trying to do that as we enter the marker and you're in a car that gives you a Freeze for 1 minute, but it does not work i dont know why. Debug shows nothing. and in meta i was do server side and client side and still nothing, help mojmarker = createMarker (-1984.6114501953, 248.5777130127, 34.171875, 'cylinder', 5, 0, 0, 190) function spanie() if source == mojmarker then if isPedInVehicle (player) then setPedFrozen ( player, true ) setTimer( setPedFrozen, 1000,1, player, false ) end end end addEventHandler ("onClientMarkerhit", mojmarker, spanie) Link to comment
-.Paradox.- Posted October 19, 2013 Share Posted October 19, 2013 (edited) try EDIT: mojmarker = createMarker (-1984.6114501953, 248.5777130127, 34.171875, 'cylinder', 5, 0, 0, 190) function spanie(player) if source == mojmarker then if isPedInVehicle (player) then setPedFrozen ( player, true ) setTimer( setPedFrozen, 1000,1, player, false ) end end end addEventHandler ("onClientMarkerhit", mojmarker, spanie) Edited October 19, 2013 by Guest Link to comment
Multi Posted October 19, 2013 Author Share Posted October 19, 2013 its still not working :{{ Link to comment
xScatta Posted October 19, 2013 Share Posted October 19, 2013 Try this. (( NOT TESTED )) mojmarker = createMarker (-1984.6114501953, 248.5777130127, 34.171875, 'cylinder', 5, 0, 0, 190) function spanie(player) if source == mojmarker then if isPedInVehicle (player) then player = theplayer setPedFrozen ( player, true ) setTimer( function () setPedFrozen(theplayer,false)end,10000,1 ) end end end addEventHandler ("onClientMarkerhit", mojmarker, spanie) Link to comment
Multi Posted October 19, 2013 Author Share Posted October 19, 2013 no its not working :{{ debug nothing Link to comment
BieHDC Posted October 19, 2013 Share Posted October 19, 2013 Try this (untested) local mojmarker = createMarker (-1984.6114501953, 248.5777130127, 34.171875, 'cylinder', 5, 0, 0, 190) function spanie(player) if source == mojmarker then if isPedInVehicle (player) then setPedFrozen ( player, true ) setElementFrozen(getPedOccupiedVehicle(player),true) setTimer( function () setPedFrozen(player,false) setElementFrozen(getPedOccupiedVehicle(player),false) end, 60000,1 ) --60.000 is one minute end end end addEventHandler ("onClientMarkerhit", resourceRoot, spanie) Link to comment
Multi Posted October 19, 2013 Author Share Posted October 19, 2013 F**K i dont know, its not working Link to comment
BieHDC Posted October 19, 2013 Share Posted October 19, 2013 what does not work? debugscript freeze/unfreeze? if you wanna me to check you will have to wait 1h that i got time for this Link to comment
Castillo Posted October 19, 2013 Share Posted October 19, 2013 local mojmarker = createMarker ( -1984.6114501953, 248.5777130127, 34.171875, 'cylinder', 5, 0, 0, 190 ) function spanie ( player ) if ( player == localPlayer ) then if isPedInVehicle ( player ) then setElementFrozen ( getPedOccupiedVehicle ( player ), true ) else setElementFrozen ( player, true ) end setTimer ( function ( ) setElementFrozen ( player, false ) setElementFrozen ( getPedOccupiedVehicle ( player ), false ) end, 60000, 1 ) end end addEventHandler ( "onClientMarkerHit", mojmarker, spanie ) Link to comment
Multi Posted October 19, 2013 Author Share Posted October 19, 2013 still not working, i want to freez for 1 minute Link to comment
Castillo Posted October 19, 2013 Share Posted October 19, 2013 Have you set the script as client side in the meta.xml? Link to comment
Multi Posted October 19, 2013 Author Share Posted October 19, 2013 i check the code in your server ? Link to comment
Castillo Posted October 19, 2013 Share Posted October 19, 2013 I found the problem, it had a typo on the event name, instead of "onClientMarkerHit" it was "onClientMarkerhit", lowercause "h". Copy my code again. Link to comment
Castillo Posted October 19, 2013 Share Posted October 19, 2013 It works on my server, so it has to work on yours. Post your .lua script and the meta.xml. Link to comment
Phoenixx Posted October 19, 2013 Share Posted October 19, 2013 You want to freeze for 1 min exactly ? ~ Freeze and wait 1 min . Then unfreeze the player . Correct Link to comment
-.Paradox.- Posted October 19, 2013 Share Posted October 19, 2013 He want on Marker Hit ... Link to comment
Multi Posted October 19, 2013 Author Share Posted October 19, 2013 Solidsnake soryy thats was my false i think that was something with meta but marker works, but can you help me to add 3 functions i know that for you is eas but for me is hard the 3 functions is that the marker Freez Car and Player because now its only Freez Car + if you go to ther marker if the 1 minute will end you teleport you witch car to diffren place ? Link to comment
Desaster Posted October 19, 2013 Share Posted October 19, 2013 post you meta.xml maybe the error is there Link to comment
Multi Posted October 19, 2013 Author Share Posted October 19, 2013 o sorry am very sorry can you only add 1 function that if player is in vehicle Freez Player and Vehicle for 1 minute Link to comment
Multi Posted October 19, 2013 Author Share Posted October 19, 2013 Desater thanks, i fix it the meta but i dont know what was wrong because the marker was work but the function not. and can you add a function that if you are in marker and you write /sleep then freezing you and car ?? and if you are not in marker then its text on Chat " you are not in marker" Link to comment
Castillo Posted October 20, 2013 Share Posted October 20, 2013 You must use the following functions: addCommandHandler getElementColShape isElementWithinColShape outputChatBox Link to comment
Multi Posted October 20, 2013 Author Share Posted October 20, 2013 so can you add the function to the code?, because i dont klnow where Link to comment
Castillo Posted October 20, 2013 Share Posted October 20, 2013 Why don't you try to do it? Link to comment
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