SA-MP Forums Archive
OnDialogResponse - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnDialogResponse (/showthread.php?tid=287191)



OnDialogResponse - Edvin - 02.10.2011

How i made a response on this dialog?
pawn Код:
CMD:realraces( PARAMS )
{
    new str[ 128 ], str2[ 1024 ];
   
    LoadRaceNames( );
    format( str2, sizeof( str2 ), "{FFFFFF}" );
    Loop( x, TotalRaces )
    {
        format( str, 128, "%s\n", RaceNames[ x ] );
        strcat( str2, str, 1024 );
    }
    ShowPlayerDialog( playerid, CURSE_REALE, DIALOG_STYLE_LIST, "{FFFFFF}Avabile Races:", str2, "Join", "Cancel" );
    return 1;
}



Re: OnDialogResponse - Wesley221 - 02.10.2011

pawn Код:
public OnDialogResponse(....)
{
    switch( dialogid )
    {
        case CURSE_REALE:
        {

        }
    }
    return 0; // change this to 1 if its in your GM
}



Re: OnDialogResponse - Pharrel - 02.10.2011

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case CURSE_REALE:
        {
             //do what you want here
             return 1;        
         }
     }
return 1;
}
@edit ninja was faster...


Re: OnDialogResponse - Edvin - 02.10.2011

I know this!!!^^

But i don't know how can i do to load and start the selected race in the dialog...because he has %s...