active = false
local GroupName = 'KILLERS'
function turned()
if active == false then
outputChatBox("Spawn enabled")
active=true
break
else then
outputChatBox("Spawn UnEnabled")
active =false
break
end
end
addCommandHandler("spawnturn", turned)
function onWasted ()
if active == true then
if getElementData(source,'Group') == 'KILLERS' then
setTimer( function (source)
setElementDimension( source, 0 )
setElementPosition( source, 2478.705078125+math.random(1,1), -1685.421875+math.random(1,1), 13.5078125 )
setElementInterior( source, 0 )
setPedArmor ( source, 100)
setPedFightingStyle ( source, 5)
end, 1000, 1, source)
end
end
end
addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted )