hello i have one command for see player info but here is one bug when i do up id 5 it show info only for id 0 then i try down id 5 it work perfect
pawn Код:
dcmd_track(playerid, params[])
{
#pragma unused params
new iPlayer;
new current_zone = player_zone[iPlayer];
new string[124];
if (!sscanf(params, "u", iPlayer))
if (!IsPlayerConnected(iPlayer)) return SendClientMessage(playerid, 0xE40C0CAA, "Player not found.");
if (IsPlayerSpawn[iPlayer]==1) return SendClientMessage(playerid, 0xE40C0CAA, "Player has not spawned yet.");
format(string,sizeof string,"Player: %s (ID:%d)",PlayerName(iPlayer), iPlayer);
SendClientMessage(playerid,0xE89B5BBB ,string);
format(string,sizeof string,"> FPS: %d",FPS2[iPlayer]);
SendClientMessage(playerid,-1 ,string);
format(string,sizeof string,"> Ping: %d",GetPlayerPing(iPlayer));
return 1;
}
make sure you put that line below the sscanf line, you haven't defined what iPlayer is, so it defaults to 0, that's why it only works for playerid 0