04.05.2012, 12:35
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; }