Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 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.         if ( target ~= false ) then
  7.             if CurrentMoney > amount  then
  8.                 if ( player ~= false ) then
  9.                     givePlayerMoney ( target, amount )
  10.                     takePlayerMoney ( thePlayer, amount )
  11.                     outputChatBox ( " " .. thePlayer .. " gave you " .. amount .. " ", 0, 255, 0, target )
  12.                 end
  13.             end
  14.         end
  15.     end
  16. end
  17. addCommandHandler ("pay", PayPlayerToPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement