Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. function PayPlayerToPlayer ( thePlayer, commandName, target, amount, CurrentMoney )
  2.      target = getPlayerFromNick ( target )
  3.      player = getPlayerFromNick ( thePlayer )
  4.         if target and amount then
  5.      CurrentMoney = getPlayerMoney ( thePlayer )
  6.      target = getPlayerMoney ( target )
  7.         if ( target ~= false ) then
  8.             if CurrentMoney > amount  then
  9.                 if ( player ~= false ) then
  10.                     givePlayerMoney ( target, amount )
  11.                     takePlayerMoney ( thePlayer, amount )
  12.                     outputChatBox ( " " .. thePlayer .. " gave you " .. amount .. " ", 0, 255, 0, target )
  13.                 end
  14.             end
  15.         end
  16.     end
  17. end
  18. addCommandHandler ("pay", PayPlayerToPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement