pls help with stupid dialog
#10

Ddue, try it like I said
Because there are a lot of teles and can't put it on 1 line, I use this.
pawn Код:
new TelGeneral[][] =
{
    { "/4drag" },
    { "/aa" },
    { "/aaj" },
    { "/ammu1-11" },
    { "/bar1-2" },
    { "/baysidestunts" },
    { "/boatdock" },
    { "/bounce" },
    { "/bp" },
    { "/bs1-2" },
    { "/buildingjump" },
    { "/cage" },
    { "/garage" },
    { "/club1-3" },
    { "/cthustle" },
    { "/dedm" },
    { "/djam" },
    { "/drift1-19" },
    { "/driftschool" },
    { "/ee" },
    { "/eej" },
    { "/eij" },
    { "/islanddm" },
    { "/lsa" },
    { "/mc" },
    { "/newstunts" },
    { "/newworld" },
    { "/otto" },
    { "/parkour" },
    { "/quarry" },
    { "/rcshop" },
    { "/sfa" },
    { "/sfhall" },
    { "/skydrag" },
    { "/tf" },
    { "/tf2" },
    { "/usj" },
    { "/wa" },
    { "/wang" }

};
pawn Код:
if( !strcmp( cmdtext , "/teles" , true ) ) {
        new
            dialog[590],
            part[37]
            ;
        format( dialog , sizeof(dialog) , "{FFFFFF}%s" , TelGeneral[0] );
        for( new i = 1; i < sizeof( TelGeneral ); i++ ) {
            format( part , sizeof(part) , "\n%s" , TelGeneral[i] );
            strcat( dialog , part , sizeof(dialog) );
        }
        printf( "[string check] dialog length %d ( size %d )" , strlen( dialog ) , sizeof(dialog) );
// use this to check that the size of dialog is sufficient

        ShowPlayerDialog( playerid , 6 , DIALOG_STYLE_LIST , "Teleports" , dialog , "Teleport" , "Cancel" );
        return 1;
    }
pawn Код:
if(dialogid == 6) {
        if(response) {
            if(listitem == 0) {
                RemovePlayerFromVehicle(playerid);
                ResetPlayerWeapons(playerid);
                SetPlayerPos(playerid,x,y,z);
                GameTextForPlayer(playerid,"",4000,6);
            }
It works perfect to me. Change the teles to yours
Reply


Messages In This Thread
pls help with stupid dialog - by niels44 - 19.10.2011, 14:22
Re: pls help with stupid dialog - by MichaelNerd - 19.10.2011, 14:23
Re: pls help with stupid dialog - by niels44 - 19.10.2011, 14:24
Re: pls help with stupid dialog - by Pharrel - 19.10.2011, 14:24
Re: pls help with stupid dialog - by Kostas' - 19.10.2011, 14:26
Re: pls help with stupid dialog - by niels44 - 19.10.2011, 14:28
Re: pls help with stupid dialog - by niels44 - 19.10.2011, 14:32
Re: pls help with stupid dialog - by Kostas' - 19.10.2011, 14:33
Re: pls help with stupid dialog - by niels44 - 19.10.2011, 18:59
Re: pls help with stupid dialog - by Kostas' - 19.10.2011, 20:28

Forum Jump:


Users browsing this thread: 2 Guest(s)