04.05.2012, 10:28
I noticed some days ago in the console and before again.The last command i used,that uses sscanf is /loc:
pawn Код:
CMD:loc(playerid, params[])
{
new id;
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Player not connected");
if(sscanf(params, "u", id))
{
SendClientMessage(playerid, 0xFF0000FF, "Usage: /loc [playerid]");
}
else
{
new zone[MAX_ZONE_NAME];
GetPlayer2DZone(id, zone, MAX_ZONE_NAME);
new playername[MAX_PLAYER_NAME],message2[170];
GetPlayerName(id,playername,MAX_PLAYER_NAME);
format(message2,sizeof(message2),"%s(%d)'s current location: %s",playername,id,zone);
SendClientMessage(playerid,0x00C7FFAA,message2);
}
return true;
}