Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function PayPlayerToPlayer ( thePlayer, commandName, target, amount, CurrentMoney )
- target = getPlayerFromNick ( target )
- player = getPlayerFromNick ( thePlayer )
- if target and amount then
- CurrentMoney = getPlayerMoney ( thePlayer )
- target = getPlayerMoney ( target )
- if ( target ~= false ) then
- if CurrentMoney > amount then
- if ( player ~= false ) then
- givePlayerMoney ( target, amount )
- takePlayerMoney ( thePlayer, amount )
- outputChatBox ( " " .. thePlayer .. " gave you " .. amount .. " ", 0, 255, 0, target )
- end
- end
- end
- end
- end
- addCommandHandler ("pay", PayPlayerToPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement