OnDialogResponse
#1

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;
}
Reply
#2

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

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

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...
Reply
#4

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...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)