local cooldown = {}
function consoleCreateMarker ( playerSource )
if ( playerSource ) then
if cooldown[playerSource] and isTimer(cooldown[playerSource]) then return outputChatBox("Spam protection 60 seconds", playerSource, 255, 0, 0) end
local x, y, z = getElementPosition ( playerSource )
createMarker ( x, y, z, "checkpoint", 2, 255, 0, 0, 255 )
outputChatBox ( "You got a red marker", playerSource )
cooldown[playerSource] = setTimer(timerEnd, 60000, 1, playerSource)
end
end
addCommandHandler ( "createmarker", consoleCreateMarker )
function timerEnd(player)
if cooldown[player] and isTimer(cooldown[player]) then
killTimer(cooldown[player])
cooldown[player] = nil
end