Dialog Help PLEASE!
#7

Quote:
Originally Posted by WooTFTW
Посмотреть сообщение
pawn Код:
case DIALOG_LOGIN:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    new
                        tmp2[ 256 ],
                        playername2[ MAX_PLAYER_NAME ]
                    ;
                    GetPlayerName(playerid, playername2, sizeof(playername2));
                    format(tmp2, sizeof(tmp2), "~w~Welcome ~n~~g~%s", playername2);
                    GameTextForPlayer(playerid, tmp2, 5000, 1);
                    SetTimerEx("UnsetFirstSpawn", 5000, false, "i", playerid);
                    GivePlayerCash(playerid, PlayerInfo[playerid][pCash]);
                    SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","You have entered an incorrect password.\nType your password below to login.","Login","Quit");
                }
                return 1;
            }
        }
    }
    if(dialogid == 5)
    {
        if(response)
        {
            new message[256+1];
            if(listitem == 0)
            {
            format(message, 256, "You selected Los Santos Police Department, And got teleported to there!", listitem);
            SendClientMessage(playerid, 0xFFFFFFFF, message);
            SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828);
            }
            if(listitem == 1)
            {
              format(message, 256, "You selected Unity Station, And got teleported to there!", listitem);
              SendClientMessage(playerid, 0xFFFFFFFF, message);
              SetPlayerPos(playerid, 1729.6116,-1855.1116,13.4141);
              return 1;
            }
        }
    }
    return 0;
}
pawn Код:
CMD:teleport(playerid, param[])
{
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Teleport Menu", "Unity Station \n Los Santos Police Department", "Select", "Cancel");
return 1;
}
Here, this should fix it.
You should work on your scripting style tho, because its inefficent.

Sorry, im new to scripting just looking at some tutorials what is the best way to script
Reply


Messages In This Thread
Dialog Help PLEASE! - by Scripter12345 - 01.04.2012, 20:20
Re: Dialog Help PLEASE! - by WooTFTW - 01.04.2012, 20:41
Re: Dialog Help PLEASE! - by Scripter12345 - 01.04.2012, 20:43
Re: Dialog Help PLEASE! - by WooTFTW - 01.04.2012, 20:46
Re: Dialog Help PLEASE! - by Scripter12345 - 01.04.2012, 20:48
Re: Dialog Help PLEASE! - by WooTFTW - 01.04.2012, 20:49
Re: Dialog Help PLEASE! - by Scripter12345 - 01.04.2012, 20:51
Re: Dialog Help PLEASE! - by WooTFTW - 01.04.2012, 20:53
Re: Dialog Help PLEASE! - by Scripter12345 - 01.04.2012, 21:10
Re: Dialog Help PLEASE! - by WooTFTW - 01.04.2012, 21:30

Forum Jump:


Users browsing this thread: 5 Guest(s)