SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 10/03/2018, 03:23 AM   #1
Josh_Main
Huge Clucker
 
Join Date: Mar 2012
Location: Main-Hosts.com
Posts: 446
Reputation: 12
Default Won't spawn

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.

pawn Code:
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 Code:
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

Any help would be greatly appreciated
Josh_Main is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
'Corrupt Spawn' - Players crash sometimes when they spawn. Dokins Scripting Help 9 04/10/2016 10:37 PM
Spawn issue - I spawn at Blueberry after registering AndySedeyn Scripting Help 15 25/05/2014 10:44 PM
Spawn Selection textdraw and spawn music DownDuckling Scripting Help 4 14/10/2012 02:42 AM
[AJUDA] Colocar TextDraw Antes do Spawn e Após Spawn davidjnio Português/Portuguese 9 30/08/2011 07:53 PM
[Help] Object/item ectra spawn on player spawn? No-Half-Measures Help Archive 3 21/01/2010 10:38 AM


All times are GMT. The time now is 12:48 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.