SA-MP Forums Archive
Some IDs are ruinned - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Some IDs are ruinned (/showthread.php?tid=612550)



Some IDs are ruinned - Problems - 19.07.2016

I got a problem that when some players are joined and connected I can't use any command(All Commands) on them and it just says that the player isn't connected and I'm using the latest sscanf version for example
pawn Код:
dcmd_getstats(playerid,params[])
{
    new ID;
    if(sscanf(params, "u", ID))
    {
        SendClientMessage(playerid,COLOR_WHITE,"USAGE: /getstats (Player Name/ID)");
        return 1;
    }
    if(!IsPlayerConnected(ID))
    {
        format(string,sizeof(string)," The Player ID (%d) is not connected to the server.",ID);
        SendClientMessage(playerid,COLOR_WHITE,string);
        return 1;
    }
    if(IsSpawned[ID] != 1)
    {
        SendClientMessage(playerid,COLOR_WHITE," This player must be spawned in order to be able to use this command on them.");
        return 1;
    }
    ShowPlayerDialog(playerid,DIALOG_STATS, DIALOG_STYLE_MSGBOX,"{53C506}Stats",GetPlayerStats(ID),"Close","");
    return true;
}