10.03.2018, 02:23
For some reason when new players join my server they can't spawn. The player has to answer a question "Male" or "Female" and when they do, it shows the next dialog box "Do you agree to abide by server rules" etc and whether you click "Yes, I agree" or "No, I don't agree" the same thing happens.. Nothing. The player does not spawn or anything, just gets stuck on the tutorial screen. It seems the dialog box isn't doing anything at all.
This is the SetPlayerSpawn, not sure if this helps
Any help would be greatly appreciated
pawn Код:
if(dialogid == SEXMENU)
{
if(response)
{
SetPlayerPos(playerid, 1.71875, 30.4062, 1200.34);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pSex] = 1;
RegistrationStep[playerid] = 2;
SetPlayerSkin(playerid, 261);
ShowPlayerDialog(playerid, OOCMENU, DIALOG_STYLE_LIST, "I agree to abide by AZ:RP rules", "Yes, I agree\nNo, I don't agree.", "Select", "Cancel");
return 0;
}
else
{
SetPlayerPos(playerid, 1.71875, 30.4062, 1200.34);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pSex] = 2;
RegistrationStep[playerid] = 2;
SetPlayerSkin(playerid, 193);
ShowPlayerDialog(playerid, OOCMENU, DIALOG_STYLE_LIST, "I agree to abide by AZ:RP rules", "No, I don't agree\nYes, I agree.", "Select", "Cancel");
return 0;
}
}
/*if(dialogid == AGEMENU)
{
if(response)
{
RegistrationStep[playerid] = 0;
TutTime[playerid] = 1;
CanTalk[playerid] = 0;
return 1;
}
}*/
if(dialogid == OOCMENU)
{
if(response)
{
if(listitem == 0) //
{
if(RegistrationStep[playerid] == 3)
{
SendClientMessage(playerid, COLOR_RED, "Answer Result: Incorrect. You have been kicked, please try again.");
Kick(playerid); //it's not kicking, nothing is happening
return 1;
}
}
if(listitem == 1) //
{
if(RegistrationStep[playerid] == 3)
{
RegistrationStep[playerid] = 4;
ShowPlayerDialog(playerid, DMMENU, DIALOG_STYLE_LIST, "What does DM mean?","Death Metal\nDeath Match\nDangerous Monkey ", "Select", "Cancel");
//This dialog above does not show, nothing happens
return 1;
}
}
}
return 1;
}
if(dialogid == DMMENU)
{
if(response)
{
if(listitem == 0) //
{
if(RegistrationStep[playerid] == 4)
{
SendClientMessage(playerid, COLOR_RED, "Answer Result: Incorrect. You have been kicked, please try again.");
Kick(playerid);
return 1;
}
}
if(listitem == 1) //
{
if(RegistrationStep[playerid] == 4)
{
RegistrationStep[playerid] = 5;
ShowPlayerDialog(playerid, PGMENU, DIALOG_STYLE_LIST, "What does PG mean?","Power Gaming\nPig Gaming\nPlay Grants", "Select", "Cancel");
return 1;
}
}
if(listitem == 2) //
{
if(RegistrationStep[playerid] == 4)
{
SendClientMessage(playerid, COLOR_RED, "Answer Result: Incorrect. You have been kicked, please try again.");
Kick(playerid);
return 1;
}
}
}
return 1;
}
if(dialogid == PGMENU)
{
if(response)
{
if(listitem == 0) //
{
if(RegistrationStep[playerid] == 5)
{
RegistrationStep[playerid] = 6;
ShowPlayerDialog(playerid, PCMENU, DIALOG_STYLE_LIST, "What is RK?","Revenge Kick\nRevent Kettle\nRevenge Kill", "Select", "Cancel");
return 1;
}
}
if(listitem == 1) //
{
if(RegistrationStep[playerid] == 5)
{
SendClientMessage(playerid, COLOR_RED, "Answer Result: Incorrect. You have been kicked, please try again.");
Kick(playerid);
return 1;
}
}
if(listitem == 2) //
{
if(RegistrationStep[playerid] == 5)
{
SendClientMessage(playerid, COLOR_RED, "Answer Result: Incorrect. You have been kicked, please try again.");
Kick(playerid);
return 1;
}
}
}
return 1;
}
if(dialogid == PCMENU)
{
if(response)
{
if(listitem == 0) //
{
if(RegistrationStep[playerid] == 6)
{
SendClientMessage(playerid, COLOR_RED, "Answer Result: Incorrect. You have been kicked, please try again.");
Kick(playerid);
return 1;
}
}
if(listitem == 1) //
{
if(RegistrationStep[playerid] == 6)
{
SendClientMessage(playerid, COLOR_RED, "Answer Result: Incorrect. You have been kicked, please try again.");
Kick(playerid);
return 1;
}
}
if(listitem == 2) //
{
if(RegistrationStep[playerid] == 6)
{
RegistrationStep[playerid] = 7;
ShowPlayerDialog(playerid, CKMENU, DIALOG_STYLE_LIST, "What does CK mean?","Never heard of it\nChicken Krap\nCharacter Kill", "Select", "Cancel");
return 1;
}
}
}
return 1;
}
if(dialogid == CKMENU)
{
if(response)
{
if(listitem == 0) //
{
if(RegistrationStep[playerid] == 8)
{
SendClientMessage(playerid, COLOR_RED, "Answer Result: Incorrect. You have been kicked, please try again.");
Kick(playerid);
return 1;
}
}
if(listitem == 1) //
{
if(RegistrationStep[playerid] == 8)
{
SendClientMessage(playerid, COLOR_RED, "Answer Result: Incorrect. You have been kicked, please try again.");
Kick(playerid);
return 1;
}
}
if(listitem == 2) //
{
if(RegistrationStep[playerid] == 8)
{
RegistrationStep[playerid] = 0;
CanTalk[playerid] = 1;
TutTime[playerid] = 0;
return 1;
}
}
}
return 1;
}
//etc etc
This is the SetPlayerSpawn, not sure if this helps
pawn Код:
public SetPlayerSpawn(playerid)
{
if(IsPlayerConnected(playerid))
{
//TUTORIAL
if(PlayerInfo[playerid][pTut] == 0)
{
HideArea(playerid);
ShowGUI(playerid);
gOoc[playerid] = 1; gNewbie[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1; RegistrationStep[playerid] = 1; CanTalk[playerid] = 1;
SetPlayerPos(playerid, 1305.5662841797,-1543.8950195313,122.20141601563);
TogglePlayerControllable(playerid, 0);
SetPlayerCameraPos(playerid, 1460.0, -1324.0, 287.2);
SetPlayerCameraLookAt(playerid, 1374.5, -1291.1, 239.0);
ShowPlayerDialog(playerid, SEXMENU, DIALOG_STYLE_MSGBOX, "{00C0FF}Characteristics","{FFFFFF}- Please tell us your gender", "Male", "Female");
return 1;
}
HideGUI(playerid);
//etc etc