Huhu,
wie oben schon erklärt, muss man bei der Registration das Tutorial 2 mal durchlaufen.
Warum ist das so?
Hier das wichtigste aus dem Tutorial, und alles, was dazu gehört:
else if(TutTime[playerid] == 67)
{
SetPlayerPos(playerid,1191.0471,-912.3734,48.4298);
SetPlayerCameraPos(playerid,1173.7498,-963.0220,66.3751);
SetPlayerCameraLookAt(playerid,1199.3129,-909.8687,48.4400);
KillTimer(TutTimer[playerid]);
TutTime[playerid] = -1;
TogglePlayerSpectating(playerid,false);
ShowPlayerDialog(playerid,DIALOG_GESCHLECHT,DIALOG_STYLE_LIST,"Geschlecht auswählen","Männlich\nWeiblich","Weiter","Abbrechen");
}
{
SetPlayerPos(playerid,1191.0471,-912.3734,48.4298);
SetPlayerCameraPos(playerid,1173.7498,-963.0220,66.3751);
SetPlayerCameraLookAt(playerid,1199.3129,-909.8687,48.4400);
KillTimer(TutTimer[playerid]);
TutTime[playerid] = -1;
TogglePlayerSpectating(playerid,false);
ShowPlayerDialog(playerid,DIALOG_GESCHLECHT,DIALOG_STYLE_LIST,"Geschlecht auswählen","Männlich\nWeiblich","Weiter","Abbrechen");
}
if(FirstLogin[playerid] == true)
{
newtimer[playerid] = SetTimerEx("UpdateTextdraws",1000,1,"i",playerid);
RandomPlayerScreen(playerid);
if(!IsPlayerNPC(playerid))
{
if(GetPVarInt(playerid,"Eingeloggt") == 0)
{
if(mysql_CheckAccount(playerid) == 0)
{
new Hour, Minute, Second;
gettime(Hour, Minute, Second);
if(Hour >= 1 && Hour <= 6)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Du kannst dich um diese Uhrzeit nicht registrieren. Bitte versuche es später erneut!");
Kick(playerid);
}
else
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Registration","Bitte registriere dich mit einem Passwort:","Register","Abbrechen");
SetPlayerSkin(playerid,101);
SpielerInfo[playerid][pSkin] = 101;
}
}
else if(mysql_CheckAccount(playerid) == 1)
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Dein Account wurde in unserem System gefunden!\nBitte logge dich mit deinem Passwort ein:","Login","Abbrechen");
}
}
}
}
else if(pFirstLog[playerid] == true)
{
RandomPlayerScreen(playerid);
TogglePlayerControllable(playerid,false);
TutTime[playerid] = 1;
TogglePlayerSpectating(playerid,true);
TutTimer[playerid] = SetTimerEx("Tutorial",1000,1,"i",playerid);
}
{
newtimer[playerid] = SetTimerEx("UpdateTextdraws",1000,1,"i",playerid);
RandomPlayerScreen(playerid);
if(!IsPlayerNPC(playerid))
{
if(GetPVarInt(playerid,"Eingeloggt") == 0)
{
if(mysql_CheckAccount(playerid) == 0)
{
new Hour, Minute, Second;
gettime(Hour, Minute, Second);
if(Hour >= 1 && Hour <= 6)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Du kannst dich um diese Uhrzeit nicht registrieren. Bitte versuche es später erneut!");
Kick(playerid);
}
else
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Registration","Bitte registriere dich mit einem Passwort:","Register","Abbrechen");
SetPlayerSkin(playerid,101);
SpielerInfo[playerid][pSkin] = 101;
}
}
else if(mysql_CheckAccount(playerid) == 1)
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Dein Account wurde in unserem System gefunden!\nBitte logge dich mit deinem Passwort ein:","Login","Abbrechen");
}
}
}
}
else if(pFirstLog[playerid] == true)
{
RandomPlayerScreen(playerid);
TogglePlayerControllable(playerid,false);
TutTime[playerid] = 1;
TogglePlayerSpectating(playerid,true);
TutTimer[playerid] = SetTimerEx("Tutorial",1000,1,"i",playerid);
}
case DIALOG_REGISTER:
{
if(response)
{
if(strlen(inputtext) == 0)
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Registration","Das eingegebene Passwort war zu kurz!\nBitte registriere dich mit einem längerem Passwort:","Register","Abbrechen");
return 1;
}
else
{
CreateAccount(playerid, MD5_Hash(inputtext));
SetPVarInt(playerid,"Eingeloggt",1);
SpielerInfo[playerid][pNextPayday] = 0;
SetMySQLint("accounts", "NextPayday", 0, "Name", SpielerInfo[playerid][pName]);
SpielerInfo[playerid][P_Timer] = SetTimerEx("PaydayTimeCheck",60000,1,"i",playerid);
PDTimer[playerid] = SetTimerEx("UpdatePDTime",10000,1,"i",playerid);
pFirstLog[playerid] = true;
FirstLogin[playerid] = false;
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
PlayerTextDrawShow(i, Paydayzeit[i]);
PlayerTextDrawShow(i, Money[i]);
}
}
SpawnPlayer(playerid);
}
}
else
{
Kick(playerid);
}
}
case DIALOG_LOGIN:
{
if(response)
{
if(strlen(inputtext) == 0)
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Das eingegebene Passwort war falsch!\nBitte logge dich mit deinem Passwort ein:","Login","Abbrechen");
return 0;
}
else
{
new SpielerNamee[MAX_PLAYER_NAME];
GetPlayerName(playerid, SpielerNamee, MAX_PLAYER_NAME);
if(!strcmp(MD5_Hash(inputtext), mysql_ReturnPasswort(SpielerNamee), true))
{
new str[128];
format(str,sizeof(str),"Willkommen zurück, %s",PlayerName(playerid));
SetPVarInt(playerid,"Eingeloggt",1);
LoadPlayer(playerid);
SCM(playerid,COLOR_WHITE,"");
SCM(playerid,COLOR_WHITE,str);
SCM(playerid,COLOR_WHITE,"");
SpielerInfo[playerid][pNextPayday] = GetMySQLint("accounts", "NextPayday", "Name", SpielerInfo[playerid][pName]);
SpielerInfo[playerid][P_Timer] = SetTimerEx("PaydayTimeCheck",60000,1,"i",playerid);
PDTimer[playerid] = SetTimerEx("UpdatePDTime",10000,1,"i",playerid);
if(SpielerInfo[playerid][pAdmin] > 0 && SpielerInfo[playerid][pAdmin] < 5)
{
new stir[128];
if(SpielerInfo[playerid][pGeschlecht] == 1)
{
format(stir,sizeof(stir),"Meldung: %s hat sich als Supporter angemeldet. Er ist per /support erreichbar!",PlayerName(playerid));
SendClientMessageToAll(ADMDUTY,stir);
SupDuty[playerid] = 1;
SetPVarInt(playerid,"inSupport",0);
SetPVarInt(playerid,"SupportID",-1);
Supporter ++;
}
else
{
format(stir,sizeof(stir),"Meldung: %s hat sich als Supporterin angemeldet. Sie ist per /support erreichbar!",PlayerName(playerid));
SendClientMessageToAll(ADMDUTY,stir);
SupDuty[playerid] = 1;
SetPVarInt(playerid,"inSupport",0);
SetPVarInt(playerid,"SupportID",-1);
Supporter ++;
}
}
for(new p; p < MAX_PLAYERS; p++)
{
if(IsPlayerConnected(p))
{
new frak = SpielerInfo[playerid][pFraktion];
if(isPlayerInFrakt(p,frak) && SpielerInfo[p][pFraktion] != 0)
{
new msg[128];
format(msg,sizeof(msg),"Nachricht: Der Spieler %s hat sich eingeloggt!",PlayerName(playerid));
SCM(p,COLOR_ADMSG,msg);
}
}
}
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
PlayerTextDrawShow(i, Paydayzeit[i]);
PlayerTextDrawShow(i, Money[i]);
}
}
FirstLogin[playerid] = false;
SpawnPlayer(playerid);
}
else
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Das eingegebene Passwort war falsch!\nBitte logge dich mit deinem Passwort ein:","Login","Abbrechen");
}
}
}
else
{
Kick(playerid);
}
}
{
if(response)
{
if(strlen(inputtext) == 0)
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Registration","Das eingegebene Passwort war zu kurz!\nBitte registriere dich mit einem längerem Passwort:","Register","Abbrechen");
return 1;
}
else
{
CreateAccount(playerid, MD5_Hash(inputtext));
SetPVarInt(playerid,"Eingeloggt",1);
SpielerInfo[playerid][pNextPayday] = 0;
SetMySQLint("accounts", "NextPayday", 0, "Name", SpielerInfo[playerid][pName]);
SpielerInfo[playerid][P_Timer] = SetTimerEx("PaydayTimeCheck",60000,1,"i",playerid);
PDTimer[playerid] = SetTimerEx("UpdatePDTime",10000,1,"i",playerid);
pFirstLog[playerid] = true;
FirstLogin[playerid] = false;
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
PlayerTextDrawShow(i, Paydayzeit[i]);
PlayerTextDrawShow(i, Money[i]);
}
}
SpawnPlayer(playerid);
}
}
else
{
Kick(playerid);
}
}
case DIALOG_LOGIN:
{
if(response)
{
if(strlen(inputtext) == 0)
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Das eingegebene Passwort war falsch!\nBitte logge dich mit deinem Passwort ein:","Login","Abbrechen");
return 0;
}
else
{
new SpielerNamee[MAX_PLAYER_NAME];
GetPlayerName(playerid, SpielerNamee, MAX_PLAYER_NAME);
if(!strcmp(MD5_Hash(inputtext), mysql_ReturnPasswort(SpielerNamee), true))
{
new str[128];
format(str,sizeof(str),"Willkommen zurück, %s",PlayerName(playerid));
SetPVarInt(playerid,"Eingeloggt",1);
LoadPlayer(playerid);
SCM(playerid,COLOR_WHITE,"");
SCM(playerid,COLOR_WHITE,str);
SCM(playerid,COLOR_WHITE,"");
SpielerInfo[playerid][pNextPayday] = GetMySQLint("accounts", "NextPayday", "Name", SpielerInfo[playerid][pName]);
SpielerInfo[playerid][P_Timer] = SetTimerEx("PaydayTimeCheck",60000,1,"i",playerid);
PDTimer[playerid] = SetTimerEx("UpdatePDTime",10000,1,"i",playerid);
if(SpielerInfo[playerid][pAdmin] > 0 && SpielerInfo[playerid][pAdmin] < 5)
{
new stir[128];
if(SpielerInfo[playerid][pGeschlecht] == 1)
{
format(stir,sizeof(stir),"Meldung: %s hat sich als Supporter angemeldet. Er ist per /support erreichbar!",PlayerName(playerid));
SendClientMessageToAll(ADMDUTY,stir);
SupDuty[playerid] = 1;
SetPVarInt(playerid,"inSupport",0);
SetPVarInt(playerid,"SupportID",-1);
Supporter ++;
}
else
{
format(stir,sizeof(stir),"Meldung: %s hat sich als Supporterin angemeldet. Sie ist per /support erreichbar!",PlayerName(playerid));
SendClientMessageToAll(ADMDUTY,stir);
SupDuty[playerid] = 1;
SetPVarInt(playerid,"inSupport",0);
SetPVarInt(playerid,"SupportID",-1);
Supporter ++;
}
}
for(new p; p < MAX_PLAYERS; p++)
{
if(IsPlayerConnected(p))
{
new frak = SpielerInfo[playerid][pFraktion];
if(isPlayerInFrakt(p,frak) && SpielerInfo[p][pFraktion] != 0)
{
new msg[128];
format(msg,sizeof(msg),"Nachricht: Der Spieler %s hat sich eingeloggt!",PlayerName(playerid));
SCM(p,COLOR_ADMSG,msg);
}
}
}
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
PlayerTextDrawShow(i, Paydayzeit[i]);
PlayerTextDrawShow(i, Money[i]);
}
}
FirstLogin[playerid] = false;
SpawnPlayer(playerid);
}
else
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Das eingegebene Passwort war falsch!\nBitte logge dich mit deinem Passwort ein:","Login","Abbrechen");
}
}
}
else
{
Kick(playerid);
}
}
Warum ist das so?
lg