Jump to content

what did i do wrong


Recommended Posts

i tried it and it doesnt give error but when i do /roll nothing happens :roll:

addCommandHandler("roll",
function(player,comd)
   randomroll = math.random(1, 3000)
   lossorwin = math.random(1, 3)
if lossorwin == 1 then
givePlayerMoney(player, 3500)
outputChatBox ( ' .. getPlayerName ( thePlayer ) .. ' roll and wins ' .. randomroll .. ' !', getRootElement(), 255, 255, 0)
    elseif lossorwin == 2 then
      takePlayerMoney(player, 3252)
      outputChatBox ( ' .. getPlayerName ( thePlayer ) .. ' roll and losses ' .. randomroll .. ' !', getRootElement(), 255, 255, 0)
elseif lossorwin == 3 then
setPlayerMuted(player, true)
setTimer(setPlayerMuted, 30000, 1, player, false)   
end
end
)

Edited by Guest
Link to comment
addCommandHandler("roll",
function(player,comd)
   randomroll = math.random(1, 3000)
   lossorwin = math.random(1, 3)
if lossorwin == 1 then
givePlayerMoney(player, 3500)
outputChatBox ( getPlayerName ( thePlayer ) .. ' roll and wins ' .. randomroll .. ' !', getRootElement(), 255, 255, 0)
elseif lossorwin == 2 then
takePlayerMoney(player, 3252)
outputChatBox (  getPlayerName ( thePlayer ) .. ' roll and losses ' .. randomroll .. ' !', getRootElement(), 255, 255, 0)
elseif lossorwin == 3 then
setPlayerMuted(player, true)
setTimer(setPlayerMuted, 30000, 1, player, false)   
end
end
)

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...