Zdzisiek Posted July 10, 2010 Share Posted July 10, 2010 hello. ive got problem now with adding respawntime to this script ;/ i just want to make this repair spawning every 30 sec after someone pickup this.. and with mtawiki its still dont work. local myMarker = createMarker ( 3493.390381, -2223.425293, 15.378421, "corona", 3, 225, 255, 0, 255 ) function MarkerHit6 ( theVehicle ) fixVehicle(theVehicle) respawnTime=30000 end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) im newbie with this stuff ;D Link to comment
Callum Posted July 10, 2010 Share Posted July 10, 2010 Not tested it, but maybe this will work, but I recommend you use pickups instead of markers for this type of script. local myMarker = createMarker(3493.390381,-2223.425293,15.378421,"corona",3,225,255,0,255) function markerHit6(hitElement) if (getElementType(hitElement) == "vehicle") then fixVehicle(hitElement) destroyElement(source) setTimer(function() myMarker = createMarker(3493.390381,-2223.425293,15.378421,"corona",3,225,255,0,255) end,30000,1) end end addEventHandler("onMarkerHit",myMarker,markerHit6) Link to comment
Zdzisiek Posted July 10, 2010 Author Share Posted July 10, 2010 yea its work ! but after when i take it and wait this 30 sec and pick it up again it doesnt disapear Link to comment
Callum Posted July 10, 2010 Share Posted July 10, 2010 That's why you should just use pickups, when creating a pickup there is an argument for respawnTime. Link to comment
Zdzisiek Posted July 11, 2010 Author Share Posted July 11, 2010 aww ;/ thanks anyway ^^ 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