Simbad de Zeeman Posted January 8, 2008 Share Posted January 8, 2008 (edited) Ok i made a simple /givecash command, here you are function giveCash( source, command, giveplayername, amount ) local money = getPlayerMoney( source ) local givenplayer = getPlayerFromNick ( giveplayername ) local playername = getClientName ( source ) local moneytogive = tonumber(amount) if( money < moneytogive ) then outputChatBox ( "* Invalid amount", source, 243, 151, 12 ) return end if( moneytogive < 1 ) then outputChatBox ( "* Invalid amount", source, 243, 151, 12 ) return end if( givenplayer ) then givePlayerMoney ( givenplayer, amount ) takePlayerMoney ( source, tonumber(amount) ) outputChatBox ( "* You have send $" ..amount.." to "..getClientName ( givenplayer ).. ".", source, 243, 151, 12 ) outputChatBox ( "* " ..playername.. " sent you $" ..amount.. ".", givenplayer, 243, 151, 12 ) else outputChatBox ( "* That playername does not exist", source, 243, 151, 12 ) end end addCommandHandler ( "givecash", giveCash ) Edited June 9, 2008 by Guest Link to comment
BrokenGlass Posted January 8, 2008 Share Posted January 8, 2008 This helps lots! thanks also helps alot of RP scripter Link to comment
bossyboy Posted January 9, 2008 Share Posted January 9, 2008 Thanks for this, will be useful. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now