Dialog Help
#3

pawn Код:
#include <a_samp>
#include <sscanf2>

#define referDialog ( 13245 )

public OnPlayerConnect ( playerid )
{
    ShowPlayerDialog ( playerid, referDialog, DIALOG_STYLE_INPUT, "Referal?", "Did anyone refer you here?", "There", "Nah" );
    return 1;
}

public OnDialogResponse ( playerid, dialogid, response, listitem, inputtext [ ] )
{
    new
        rPlayer
    ;

    switch ( dialogid )
    {
        case referDialog:
        {
            if ( sscanf ( inputtext, "u", rPlayer ) ) ShowPlayerDialog ( playerid, referDialog, DIALOG_STYLE_INPUT, "Referal?", "Did anyone refer you here ?\n[ Please input someone ]", "There", "Nah" );
            else if ( rPlayer == INVALID_PLAYER_ID ) ShowPlayerDialog ( playerid, referDialog, DIALOG_STYLE_INPUT, "Referal?", "Did anyone refer you here ?\n[ Invalid player ]", "There", "Nah" );
            else
            {
                GivePlayerMoney ( rPlayer, 1337 );
                SendClientMessage ( playerid, 0xFFFFFFAA, "Thanks for referring someone." );
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Dialog Help - by Jacob_Venturas - 03.12.2010, 02:55
Re: Dialog Help - by Jacob_Venturas - 03.12.2010, 04:10
Re: Dialog Help - by Retardedwolf - 03.12.2010, 04:32
Re: Dialog Help - by JamesC - 03.12.2010, 04:33
Re: Dialog Help - by Jacob_Venturas - 03.12.2010, 21:45

Forum Jump:


Users browsing this thread: 1 Guest(s)