GivePlayerMoney, 1 Error
#2

id use sscanf as str is slower and also i believe you need :
PHP код:
CMD:giveplayeridparams[ ] )
{
new 
money;
new 
giveplayerid [MAX_PLAYER_NAME];
if ( 
sscanfparams"ui"giveplayeridmoney) ) return SendClientMessageplayeridCOLOR_RED"USAGE: {FFFF00}/give [playerid] [amount]" );
GivePlayerMoney(giveplayeridmoney);
GivePlayerMoney(playerid, -money);
return 
1;

code might be wrong but the idea is there havent tested it,
also need to include sscanf at the top of your script
and need to define the colour red i dont no its hex value off by heart

you could also add if player doesnt have enough cash then say so or this:
PHP код:
    if ( giveplayerid == INVALID_PLAYER_ID ) return SendClientMessageplayeridCOLOR_RED"Player Is Not Connected!" ); 
Reply


Messages In This Thread
GivePlayerMoney, 1 Error - by KampfMopZ - 03.12.2011, 16:54
Re: GivePlayerMoney, 1 Error - by English-Conceptz - 03.12.2011, 17:03
AW: GivePlayerMoney, 1 Error - by KampfMopZ - 03.12.2011, 17:14
Re: GivePlayerMoney, 1 Error - by English-Conceptz - 03.12.2011, 17:17
AW: GivePlayerMoney, 1 Error - by KampfMopZ - 03.12.2011, 17:25
Re: GivePlayerMoney, 1 Error - by English-Conceptz - 03.12.2011, 17:29
Re: GivePlayerMoney, 1 Error - by iPLEOMAX - 03.12.2011, 17:29
AW: GivePlayerMoney, 1 Error - by KampfMopZ - 03.12.2011, 17:54

Forum Jump:


Users browsing this thread: 1 Guest(s)