03.03.2011, 13:24
Well it looks like your code doesn't make much sense, looking at this GetPlayer2DZone function, it doesn't return a string at all, it actually stores it in the string "zone", which you are not using at all!
So forget about the t variable and its format, and just add zone into the format directly, for example:
So forget about the t variable and its format, and just add zone into the format directly, for example:
pawn Код:
CMD:loc(playerid, params[])
{
new id;
if(otype[playerid] != 1) return SendClientMessage(playerid, red, "You cannot use this command.");
if(sscanf(params,"u",id)) return SendClientMessage(playerid, red, "USAGE:/loc [id]");
new r[64],zone[128];
GetPlayer2DZone(id, zone, sizeof(zone));
format(r, sizeof(r),"Suspect is in %s",zone);
SendClientMessage(playerid, COLOR_ORANGE, r);
return 1;
}