IsPlayerConnect inside the dialog not work
#3

You have to check if that player id is connected before using the id in any array:
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.");
......
}
Or, better, instead of !IsPlayerConnected(id) use id == INVALID_PLAYER_ID.
Reply


Messages In This Thread
IsPlayerConnect inside the dialog not work - by Sn4ke2 - 02.09.2015, 11:38
Re: IsPlayerConnect inside the dialog not work - by ExTaZZ69 - 02.09.2015, 11:45
Re: IsPlayerConnect inside the dialog not work - by IstuntmanI - 02.09.2015, 11:52
Re: IsPlayerConnect inside the dialog not work - by Sn4ke2 - 02.09.2015, 12:13
Re: IsPlayerConnect inside the dialog not work - by IstuntmanI - 02.09.2015, 12:14
Re: IsPlayerConnect inside the dialog not work - by Sn4ke2 - 02.09.2015, 12:22
Re: IsPlayerConnect inside the dialog not work - by Sn4ke2 - 02.09.2015, 12:37
Re: IsPlayerConnect inside the dialog not work - by IstuntmanI - 02.09.2015, 12:42
Re: IsPlayerConnect inside the dialog not work - by Sn4ke2 - 02.09.2015, 12:53

Forum Jump:


Users browsing this thread: 2 Guest(s)