Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.10 KB | None | 0 0
  1. function giveMoney()
  2.     for i,player in ipairs(getElementsByType('player')) do
  3.         local acc = getPlayerAccount(player)
  4.         if isGuestAccount(acc) then
  5.             outputChatBox("#CEE3F6To receive money, you must be logged in.", player, 0, 0, 0, true)
  6.         else
  7.             if m_Setted[player] == 0 then
  8.                 if getElementData(player, "State") == "waiting" then
  9.                     return
  10.                 else
  11.                     if getElementData(player, "State") == "alive" then
  12.                         outputChatBox("You won $500 for this round.", player)
  13.                         givePlayerMoney(player, 500)
  14.                         p_Rank[player] = -255
  15.                         m_Setted[player] = 1
  16.                     end
  17.                     if p_Rank[player] == 2 then
  18.                         outputChatBox("You won $250 for this round.", player)
  19.                         givePlayerMoney(player, 250)
  20.                         m_Setted[player] = 1
  21.                     end
  22.                     if p_Rank[player] == 3 then
  23.                         outputChatBox("You won $200 for this round.", player)
  24.                         givePlayerMoney(player, 200)
  25.                         m_Setted[player] = 1
  26.                     end
  27.                     if p_Rank[player] == 4 then
  28.                         outputChatBox("You won $175 for this round.", player)
  29.                         givePlayerMoney(player, 175)
  30.                         m_Setted[player] = 1
  31.                     end
  32.                     if p_Rank[player] == 5 then
  33.                         outputChatBox("You won $150 for this round.", player)
  34.                         givePlayerMoney(player, 150)
  35.                         m_Setted[player] = 1
  36.                     end
  37.                     if p_Rank[player] == 6 then
  38.                         outputChatBox("You won $125 for this round.", player)
  39.                         givePlayerMoney(player, 125)
  40.                         m_Setted[player] = 1
  41.                     end
  42.                     if p_Rank[player] == 7 then
  43.                         outputChatBox("You won $100 for this round.", player)
  44.                         givePlayerMoney(player, 100)
  45.                         m_Setted[player] = 1
  46.                     end
  47.                     if p_Rank[player] == 8 then
  48.                         outputChatBox("You won $75 for this round.", player)
  49.                         givePlayerMoney(player, 75)
  50.                         m_Setted[player] = 1
  51.                     end
  52.                     if p_Rank[player] == 9 then
  53.                         outputChatBox("You won $50 for this round.", player)
  54.                         givePlayerMoney(player, 50)
  55.                         m_Setted[player] = 1
  56.                     end
  57.                     if p_Rank[player] > 9 then
  58.                         outputChatBox("You won $25 for this round.", player)
  59.                         givePlayerMoney(player, 25)
  60.                         m_Setted[player] = 1
  61.                     end
  62.                 end
  63.             end
  64.         end
  65.     end
  66. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement