warnings
#3

You need to use a variable the the player's name will be stored to that variable. Also, it's better to use the "r" specifier on sscanf.
pawn Код:
CMD:hi(playerid,params[])
{
    new player1,string[128], name1[ 24 ], namep[ 24 ];
    if(sscanf(params, "r",player1)) return SendClientMessage(playerid, 0xFF0000FF,"/hi [Player id]");
    GetPlayerName(playerid, namep, 24);
    GetPlayerName(player1, name1, 24);
    format(string,sizeof(string),"%s Says Hi To %s", namep, name1 );
    SCMTA(COLOR_GREEN,string);
    return 1;
}

CMD:wb(playerid,params[])
{
    new Player1,string[128], name1[ 24 ], namep[ 24 ];
    if(sscanf(params,"r",Player1)) return SendClientMessage(playerid, 0xFF0000FF, "/wb [Player id]");
    GetPlayerName(playerid, namep, 24);
    GetPlayerName(player1, name1, 24);
    format(string,sizeof(string),"Welcome Back \"%s\" (From: %s)",name1,namep);
    SCMTA(COLOR_GREEN,string);
    return 1;
}
@XStormiest
- It's slower than getting the name on the command.
Reply


Messages In This Thread
warnings - by Windrush - 16.12.2012, 10:58
Re: warnings - by XStormiest - 16.12.2012, 11:02
Re: warnings - by Konstantinos - 16.12.2012, 11:03
Re: warnings - by XStormiest - 16.12.2012, 11:07
Re: warnings - by gtakillerIV - 16.12.2012, 11:08
Re: warnings - by Konstantinos - 16.12.2012, 11:11
Re: warnings - by XStormiest - 16.12.2012, 11:17

Forum Jump:


Users browsing this thread: 3 Guest(s)