02.09.2015, 11:52
You have to check if that player id is connected before using the id in any array:
Or, better, instead of !IsPlayerConnected(id) use id == INVALID_PLAYER_ID.
pawn Код:
if(dialogid == DIALOG_F_PANEL3)
{
if(response)
{
new id, fp,fpsendername[25],giveplayer[25],fpstring[256];
if(sscanf(inputtext, "ui", id, fp)) return SCM(playerid,COLOR_WHITE,"{FF0000}Error:{FFFFFF} Syntaxa trebuie sa fie [ID] [ 0 - Fara Faction Punish 1 - Cu Faction Punish ] !");
if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_WHITE, "This player is not connected.");
if(PlayerInfo[id][pLeader] >= 1) return SCM(playerid,COLOR_WHITE,"{FFB870}Acest player este lider.");
......
}