Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if ( ( cmd == "givecash" ) || ( cmd == "give" ) )
- {
- local pcash = status[ player.ID ].Cash, plr = GetPlayer( GetTok(text, " ", 1) ), cash = GetTok(text, " ", 2 );
- if ( status[ player.ID ].Registered == false ) ErrorMessage( "[#FF0000][FINANCE] - [#FFFFFF]You need to be a part of our community to use this command.", player );
- else if ( status[ player.ID ].Logged == false ) ErrorMessage( "[#FF0000][FINANCE] - [#F FFFFF]You need to be identified to use this command.", player );
- else if ( !text ) ErrorMessage( "[#FF0000][SYNTAX] - [#FFFFFF]/"+cmd+" <player> <amount> ", player );
- else if ( !plr ) ErrorMessage( "[#FFFFFF]The Player is not online.", player );
- else if ( !IsNum( cash ) ) ErrorMessage( "[#FFFFFF]Amount must be in numbers.", player );
- else if ( pcash < cash ) ErrorMessage("[#FFFFFF]You do not have that much cash in your hand.", player );
- else
- {
- status[ player.ID ].Cash = status[ player.ID ].Cash - cash;
- status[ plr.ID ].Cash = status[ plr.ID ].Cash + cash;
- SendMessage( "[008000][FINANCE] - [#FFFFFF]You have given money $"+cash+" to "+plr.Name+".", player );
- SendMessage( "[008000][FINANCE] - [#FFFFFF]You have recieved $"+cash+" from "+player.Name+".", plr );
- player.Cash = status[ player.ID ].Cash;
- plr.Cash = status[ player.ID ].Cash;
- }
- }
Add Comment
Please, Sign In to add comment