sscanf problem
#7

Use this:
Код:
CMD:loc(playerid, params[])
{
    new id;
    if(!sscanf(params, "ii", id))
    {
        if(IsPlayerConnected(id))
        {
            new zone[MAX_ZONE_NAME];
            GetPlayer2DZone(id, zone, MAX_ZONE_NAME);
            new playername[MAX_PLAYER_NAME],message2[128];
            GetPlayerName(id,playername,MAX_PLAYER_NAME);
            format(message2,sizeof(message2),"%s(%d)'s current location: %s",playername,id,zone);
            SendClientMessage(playerid,0x00C7FFAA,message2);
        }
        else return SendClientMessage(playerid, 0xFF0000FF, "ERROR: {FFFFF}This Player is not connected");
    }
    else return SendClientMessage(playerid, 0xFF0000FF, "USAGE: {FFFFFF}/loc [id]");
    return 1;
}
Reply


Messages In This Thread
sscanf problem - by Face9000 - 04.05.2012, 10:23
Re: sscanf problem - by JaKe Elite - 04.05.2012, 10:25
Re: sscanf problem - by Face9000 - 04.05.2012, 10:28
Re: sscanf problem - by JaKe Elite - 04.05.2012, 10:33
Re: sscanf problem - by Calgon - 04.05.2012, 10:52
Re: sscanf problem - by Face9000 - 04.05.2012, 11:16
Re: sscanf problem - by FOTIS6 - 04.05.2012, 12:35
Re: sscanf problem - by Littlehelper - 13.06.2012, 10:59

Forum Jump:


Users browsing this thread: 1 Guest(s)