Hallo Community
Wie kann ich das machen damit man gekickt wird, nach 3 mal falsch passwort eingabe.
Ich habs jetz so:
new Name[MAX_PLAYER_NAME];
new string[125];
GetPlayerName(playerid, Name, sizeof(Name));
if(response)
{
if(strlen(inputtext) == 0)
{
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE,"Das angegebene Passwort war nicht Richtig.");
format(string, sizeof string,"{FFFFFF}Willkommen auf German SelfMade Reallife\n\n{DB881A}Benutzername: {FFFFFF}%s\n\nBitte gib dein passwort ein.",Name);
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{37DB45}Login",string,"Login","Abbrechen");
return 1;
}
else
{
new SpielerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, SpielerName, MAX_PLAYER_NAME);
if(!strcmp(inputtext, mysql_ReturnPasswort(SpielerName), true))
{
SetPVarInt(playerid,"Eingeloggt",1);
LoadPlayer(playerid);
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
format(string, sizeof string,"Willkommen: %s",SpielerName);
SendClientMessage(playerid,COLOR_WHITE,string);
if(SpielerInfo[playerid][pAdmin] > 1)
{
SendClientMessage(playerid,COLOR_WHITE,"Du hast dich als Admin eingeloggt.");
}
SpawnPlayer(playerid);
return 1;
}
else
{
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE,"SERVER: Du hast das Passwort Falsch eingegeben 1/3.");
format(string, sizeof string,"{FFFFFF}Willkommen auf German SelfMade Reallife\n\n{DB881A}Benutzername: {FFFFFF}%s\n\nBitte gib dein passwort ein.",Name);
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{37DB45}Login",string,"Login","Abbrechen");
return 1;
}
else
{
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE,"SERVER: Du hast das Passwort Falsch eingegeben 2/3.");
format(string, sizeof string,"{FFFFFF}Willkommen auf German SelfMade Reallife\n\n{DB881A}Benutzername: {FFFFFF}%s\n\nBitte gib dein passwort ein.",Name);
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{37DB45}Login",string,"Login","Abbrechen");
return 1;
}
else
{
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
SendClientMessage(playerid,COLOR_WHITE," ");
format(string, sizeof string,"AdmCmd: %s wurde vom Anti-System gekickt, Grund: Passwort Falsch eingegebe.",SpielerName);
SendClientMessage(playerid,COLOR_LIGHTRED,string);
Kick(playerid);
return 1;
}
}
}
else
{
SendClientMessage(playerid,0xB4B4B4FF,"Du musst dich einloggen um hier Spielen zu können.");
Kick(playerid);
}