I have this bank robbery resource but I wanna make a little time between the rob and the other one how?
the code:
addEvent("robstart", true)
bankrob = {}
function rob ()
if isTimer(robbank) then
outputChatBox ("Someone is already robbing the bank", source, 255, 0, 0, false)
else
outputChatBox ("***All Police To The Bank Someone is Robbing The Bank*** ", getRootElement(), 255, 0, 0, false)
setPlayerWantedLevel ( source, 4 )
robbank = setTimer( robb, 10000, 1, source )
end
end
addEventHandler ( "robstart", getRootElement(), rob )
function robb (thePlayer)
givePlayerMoney ( thePlayer, math.random(50000, 100000) )
setPlayerWantedLevel ( thePlayer, 6 )
end
function death()
if isTimer(robbank) then killTimer(robbank) end
outputChatBox ("Robber has been killed.", getRootElement(), 0, 255, 0, false)
end
addEventHandler ( "onPlayerWasted", getRootElement(), death )