Sscanf error.
#4

The command logic is false!

It should be:

PHP код:
CMD:givemoney(playeridparams[])
{
    new 
id,amout;
    if(
sscanf(params"ui"id,amount)) return SendClientMessage(playeridCOLOR_GREY"Syntax: {FFFFFF}/givemoney [playerid] [money]");
    if(!
IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_LOL"Acel jucator nu este connectat.");
    new 
string[128];
    
GetPlayerName(idstringMAX_PLAYER_NAME);
    
GivePlayerMoney(idamount);
    
format(stringsizeof(string), "AdmCmd: You have given %s %d$."stringamount);
    return 
SendClientMessage(playeridCOLOR_ADMINstring);

Reply


Messages In This Thread
Sscanf error. - by danielpalade - 31.07.2015, 13:30
Re: Sscanf error. - by PMH - 31.07.2015, 13:35
Re: Sscanf error. - by danielpalade - 31.07.2015, 13:39
AW: Sscanf error. - by Kaliber - 31.07.2015, 14:11
Re: Sscanf error. - by Jakwob - 31.07.2015, 15:00
AW: Re: Sscanf error. - by Kaliber - 31.07.2015, 15:08

Forum Jump:


Users browsing this thread: 1 Guest(s)