Not teleporting me for some reason help
#1

pawn Код:
else if(dialogid == REGISTERAGE)
        {
            if(response)
            {
                PlayerInfo[playerid][pAge] = listitem+18;
                PlayerInfo[playerid][pOrigin] = 0;
                format(string, sizeof(string), "Ok, so you are %d year old.",PlayerInfo[playerid][pAge]);
                SendClientMessageEx(playerid, COLOR_YELLOW2, string);
                SendClientMessageEx(playerid, COLOR_LIGHTRED, "Thanks for filling in all the information, now you start playing!");
                HideTutGUIBox(playerid);
                HideTutGUIFrame(playerid, 23);
                TutStep[playerid] = 0;

                PlayerInfo[playerid][pTut] = 1;
                gOoc[playerid] = 0; gNews[playerid] = 0; gFam[playerid] = 0;
                ClearChatbox(playerid);
                TogglePlayerControllable(playerid, 1);
                SetCamBack(playerid);
                DeletePVar(playerid, "MedicBill");
                SetPlayerColor(playerid,TEAM_HIT_COLOR);
                SetPlayerInterior(playerid,0);
                SetPlayerPos(playerid, -656.01,2571.73,150.67);
                SetPlayerFacingAngle(playerid, 359.4621);
                SetCameraBehindPlayer(playerid);
                SendClientMessageEx(playerid, COLOR_WHITE, "You have been given $1000 dollars starting money, type /newtips for help on starting");
                ShowPlayerDialog(playerid, STARTERSPAWN, DIALOG_STYLE_LIST, "Select a spawn location", "Unity Station\nMarket", "Select", "Cancel");
                SetPlayerVirtualWorld(playerid, 0);//so other players can't kill the new players as they spawn
            }
            else
            {
                ShowPlayerDialog(playerid, REGISTERAGE, DIALOG_STYLE_LIST, "{0000FF}What is your characters age?", string, "Submit", "");
            }
        }
        return 1;
    }
    if(dialogid == STARTERSPAWN)
    {
        if(response)
        {
            if(listitem == 0)
            {
                SetPlayerPos(playerid, 1714.57,-1879.45,13.57);
                SetPlayerFacingAngle(playerid, 359.4621);
                SetCameraBehindPlayer(playerid);
                SendClientMessage(playerid, COLOR_WHITE, "You have successfully spawned at Unity Station");

            }
            if(listitem == 1)
            {
                SetPlayerPos(playerid, 821.87,-1350.46,13.63);
                SetPlayerFacingAngle(playerid, 359.4621);
                SetCameraBehindPlayer(playerid);
                SendClientMessage(playerid, COLOR_WHITE, "You have successfully spawned at Market");
            }
        }
    }
    if(
it should spawn me at unity if i select it but i stay in the same post and i dont get a successful message either
Reply
#2

try to change the return of OnDialogResponse to 1 or 0.
Or maybe its conflicting with other dialog id [FS] scripts.
Reply
#3

the menu shows up and everything but when i select an option it just closes and nothing
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)