Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function PayPlayerToPlayer ( source, commandName, target, amount )
- tPlayer = getPlayerFromName ( tostring(target) )
- if tPlayer and amount then
- outputChatBox(tostring(sPlayer))
- CurrentMoney = getPlayerMoney ( source )
- tMoney = getPlayerMoney ( tPlayer )
- if ( tPlayer ~= false ) then
- if CurrentMoney > amount then
- if ( player ~= false ) then
- givePlayerMoney ( tPlayer, amount )
- takePlayerMoney ( source, 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