waitTimer = {}
waitTime = 5000 -- time in miliseconds
function giveCar ( thePlayer, commandName )
if getElementType ( thePlayer ) == "player" then
if (waitTimer[thePlayer]) then
return
-- add here outputChatBox if you want it!
end
local accName = getAccountName ( getPlayerAccount ( thePlayer ) )
local x, y, z = getElementPosition(thePlayer)
if isObjectInACLGroup ("user."..accName, aclGetGroup ("VIP")) then
local comet = createVehicle ( 480, x, y, z+0.5 )
warpPlayerIntoVehicle ( thePlayer, comet )
waitTimer[thePlayer] = setTimer(waitTime, 1, function() end)
else
outputChatBox("You are not a VIP.",thePlayer,255,60,60)
end
end
end
addCommandHandler ( "pc", giveCar )
I know you can use getTickCount but this is easyer