Baseplate Posted August 17, 2011 Posted August 17, 2011 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 )
JR10 Posted August 17, 2011 Posted August 17, 2011 You mean timer between for robb.? this line: robbank = setTimer( robb, 10000, 1, source ) 10000 is the amount of time in Milliseconds. (1000 ms = 1 second)
will briggs Posted August 17, 2011 Posted August 17, 2011 Yes as JR10 said, the best thing do use would be a timer So setTimer(1000) But as i see its already added, You need to edit this line robbank = setTimer( robb, 10000, 1, source )
DhrJay Posted February 27, 2012 Posted February 27, 2012 Could you please send me a link to this resource? I need it real bad... Smiles, Jay
Baseplate Posted February 28, 2012 Author Posted February 28, 2012 Could you please send me a link to this resource?I need it real bad... Smiles, Jay Nice Bump
DhrJay Posted February 28, 2012 Posted February 28, 2012 You can create it yourself. Nah, i cant... But i dont mind learning it... If you could help me... Smiles, Jay
Baseplate Posted February 28, 2012 Author Posted February 28, 2012 You can create it yourself. Nah, i cant... But i dont mind learning it... If you could help me... Smiles, Jay mother of god,learn by yourself as he did...
Recommended Posts