SA-MP Forums Archive
Register test - 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: Register test (/showthread.php?tid=319893)



Register test - viddo - 20.02.2012

How can i create a questions dialogue on player registering ? i want it like when the player enters he gets a dialogue like What is meant by Rp: Roleplay-roll play and when he answers the question he gets the 2nd after..


Re: Register test - Konstantinos - 20.02.2012

pawn Код:
// OnPlayerRegister

ShowPlayerDialog( playerid, 99, DIALOG_STYLE_MSGBOX, "Intro", "1st Dialog About RolePlay.. Do you want to continue? ", "Yes", "No" );

// OnDialogResponse
public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
{
    switch( dialogid )
    {
        case 99:
        {
            if( !response ) return Kick( playerid ); // If 'No'
            if( response ) // If 'Yes'
            {
                ShowPlayerDialog( playerid, 99, DIALOG_STYLE_MSGBOX, "Intro", "1st About RolePlay .. ", "Close", "" );
                return 1;
            }
        }
        case 100:
        {
            if( response )
            {
                ShowPlayerDialog( playerid, 100, DIALOG_STYLE_MSGBOX, "Intro", "2nd Dialog About .. ", "Close", "" );
                return 1;
            }
        }
    }
    return 0; // "return 0;" If it's FilterScript
    // Else if it's GameMode "return 1;"
}