Dialog help
#1

if is look like that when i press second button of dialog_style_msgbox i will be kicked
pawn Код:
if(dialogid == 334)
        {
            if(response)
            {
                if(strval(inputtext) || strlen(inputtext))
                {
                    new adminsecurity = strval(inputtext);
                    if(PlayerInfo[playerid][pSec] == adminsecurity)
                    {
                        SendClientMessage(playerid, 0xFFFFFFAA, " Acum poti folosi toate comenzile, ai grija sa nu abuzezi");
                        AdminSecurity[playerid] = 1;
                    }
                    else
                    {
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        gPlayerLogTries[playerid] += 1;
                        if(gPlayerLogTries[playerid] == 4) { PlayerInfo[playerid][pLocked] = 1; }
                        format(string, 128, "AdmWarning: %s a gresit parola", sendername);
                        ABroadCast(COLOR_YELLOW,string,1);
                        SendClientMessage(playerid, COLOR_GREY,"* Wrong Password!");
                    }
                }
            }
        }
    }
    else
    {
        Kick(playerid);
    }
    return 1;
}
if is look like that when i press second button of dialog_style_msgbox nothing happens

pawn Код:
if(dialogid == 334)
        {
            if(response)
            {
                if(strval(inputtext) || strlen(inputtext))
                {
                    new adminsecurity = strval(inputtext);
                    if(PlayerInfo[playerid][pSec] == adminsecurity)
                    {
                        SendClientMessage(playerid, 0xFFFFFFAA, " Acum poti folosi toate comenzile, ai grija sa nu abuzezi");
                        AdminSecurity[playerid] = 1;
                    }
                    else
                    {
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        gPlayerLogTries[playerid] += 1;
                        if(gPlayerLogTries[playerid] == 4) { PlayerInfo[playerid][pLocked] = 1; }
                        format(string, 128, "AdmWarning: %s a gresit parola", sendername);
                        ABroadCast(COLOR_YELLOW,string,1);
                        SendClientMessage(playerid, COLOR_GREY,"* Wrong Password!");
                    }
                }
            }
        }
    }
    return 1;
}
Reply
#2

i cant undrestand what you are saying,you are tryking when player click on right button to be kicked?
Reply
#3

in the first code, if press the second button will be kicked
in the second code if click on second button nothing happens
Reply
#4

Would you like us to tell you what's wrong with the second case?
Reply
#5

i want to say that is only code but in first if i click second button of dialog i will be kicked
in second cod(it's first code but i delete kick(playerid))and if click the second button of dialog nothing happens
Reply
#6

pawn Код:
if(dialogid == 334)
        {
            if(response == 1)
            {
                if(strval(inputtext) || strlen(inputtext))
                {
                    new adminsecurity = strval(inputtext);
                    if(PlayerInfo[playerid][pSec] == adminsecurity)
                    {
                        SendClientMessage(playerid, 0xFFFFFFAA, " Acum poti folosi toate comenzile, ai grija sa nu abuzezi");
                        AdminSecurity[playerid] = 1;
                    }
                    else
                    {
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        gPlayerLogTries[playerid] += 1;
                        if(gPlayerLogTries[playerid] == 4) { PlayerInfo[playerid][pLocked] = 1; }
                        format(string, 128, "AdmWarning: %s a gresit parola", sendername);
                        ABroadCast(COLOR_YELLOW,string,1);
                        SendClientMessage(playerid, COLOR_GREY,"* Wrong Password!");
                    }
                }
            }
        }
    }
    if(response == 0)
    {
        Kick(playerid);
    }
    return 1;
}
Well hope this helped
Reply
#7

thx,now respond but is kicked me
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)