Jump to content

setting respawn on marker pickup


Zdzisiek

Recommended Posts

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

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

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...