07.03.2014, 13:58
pawn Код:
if(dialogid == LOGIN_DIALOG)
{
if(!response) return Kick(playerid);
if(strcmp(inputtext, PlayerInfo[playerid][Parola], true) == 0)
{
SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ], PlayerInfo[playerid][pAngle], 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
new string[64];
TogglePlayerSpectating(playerid, 0);
format(string, sizeof(string), "{8080FF}Reloaded: {FFFFFF}Welcome %s!", GetName(playerid));
SendClientMessage(playerid, -1, string);
}
else
{
if(IncercareLogin[playerid] == 0)
{
ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_PASSWORD, " ", "{99CCFF}Parola este gresita , ai {FF0033}5 {99CCFF}incercari ramase!", "Login", "Disconnect");
IncercareLogin[playerid] += 1;
}
else if(IncercareLogin[playerid] == 1)
{
ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_PASSWORD, " ", "{99CCFF}Parola este gresita , ai {FF0033}4 {99CCFF}incercari ramase!", "Login", "Disconnect");
IncercareLogin[playerid] += 1;
}
else if(IncercareLogin[playerid] == 2)
{
ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_PASSWORD, " ", "{99CCFF}Parola este gresita , ai {FF0033}3 {99CCFF}incercari ramase!", "Login", "Disconnect");
IncercareLogin[playerid] += 1;
}
else if(IncercareLogin[playerid] == 3)
{
ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_PASSWORD, " ", "{99CCFF}Parola este gresita , ai {FF0033}2 {99CCFF}incercari ramase!", "Login", "Disconnect");
IncercareLogin[playerid] += 1;
}
else if(IncercareLogin[playerid] == 4)
{
ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_PASSWORD, " ", "{99CCFF}Parola este gresita , ai {FF0033}1 {99CCFF}incercare ramase!", "Login", "Disconnect");
IncercareLogin[playerid] += 1;
}
else if(IncercareLogin[playerid] == 5)
{
ShowPlayerDialog(playerid, 1001, DIALOG_STYLE_MSGBOX, " ", "{99CCFF}Parola scrisa de tine nu e corecta!\nTocmai ai primit {FF0033}kick{99CCFF}, la revedere.", "Inchide", "");
IncercareLogin[playerid] = 0;
SetTimerEx("KickPublic", 1000, false, "d", playerid);
}
}