kevin11 Posted May 5, 2010 Share Posted May 5, 2010 first this http://pastebin.com/05ir1YY6 how do i put a timer between it with a message like (when someone roll and after that again he gets a message ) "Don't roll the dice more then 1 time every 30 sec" in red color i tried and a friend of mine tried but no succes 2nd what did i do wrong?? in this line "outputChatBox ( getPlayerName ( thePlayer ) .. ' has won $700 as last player" this is link for full script (if needed) http://pastebin.com/Vys6JPJT Link to comment
Nich Posted May 5, 2010 Share Posted May 5, 2010 Try something like this: local restriction = nil addCommandHandler("roll", function(thePlayer,comd) if restriction then outputChatBox( "your message", getRootElement(), 255, 0, 0) return false; end restriction = true local resetRestriction = setTimer( restrictionEnd, 30000,1) randomroll = math.random(1, 3000) lossorwin = math.random(1, 3) if lossorwin == 1 then givePlayerMoney(thePlayer, 5500) outputChatBox ( getPlayerName ( thePlayer ) .. ' roll and wins ' .. randomroll .. ' !', getRootElement(), 255, 255, 0) elseif lossorwin == 2 then takePlayerMoney(thePlayer, 5000) outputChatBox ( getPlayerName ( thePlayer ) .. ' roll and losses ' .. randomroll .. ' !', getRootElement(), 255, 255, 0) elseif lossorwin == 3 then setPlayerMuted(player, true) setTimer(setPlayerMuted, 30000, 1, player, false) outputChatBox ( getPlayerName ( thePlayer ) .. ' roll and is now muted !', getRootElement(), 255, 255, 0) end end ) function restrictionEnd() restriction = false; end 2. addEvent("onPlayerDestructionDerbyWin",true) addEventHandler("onPlayerDestructionDerbyWin",getRootElement(), function (winner) givePlayerMoney(winner, 700) outputChatBox(getPlayerName ( winner ) .. " has won $700 as last player alive",getRootElement(),0,255,0) end ) Link to comment
kevin11 Posted May 5, 2010 Author Share Posted May 5, 2010 that..that.......that was good:D all scripts work ty Link to comment
kevin11 Posted May 7, 2010 Author Share Posted May 7, 2010 need help at that roll script if i roll everyone needs to wait 30sec helpme Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now