Help With this script plz !!
#4

ON TOP OF YOUR SCRIPT:
pawn Код:
#define DIALOG_ATM 5461
Then, this is the command using ZCMD:
pawn Код:
COMMAND:atm(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 2, atmX, atmY, atmZ))
    {
        ShowPlayerDialog(playerid, DIALOG_ATM, DIALOG_STYLE_LIST, "ATM selection list", "1. Deposit money\n2. Withdraw money", "Select", "Cancel");
    }
    return 1;
}
Then, OnDialogResponse callback:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch( dialogid )
    {
        case DIALOG_ATM:
        {
            if(!response) return SendClientMessage(playerid,, COLOR_WHITE, "You have decided to cancel");
            if(response)
            {
                switch(listitem)
                 {
                    case 0: // first item: "deposit money"
                    {
                        // code here
                    }
                    case 1: // second item: "withdraw money"
                    {
                        // code here
                    }
                 }
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Help With this script plz !! - by MichaelProPlayer - 05.06.2012, 10:48
Re: Help With this script plz !! - by MichaelProPlayer - 05.06.2012, 10:51
Re: Help With this script plz !! - by Flake. - 05.06.2012, 10:53
Re: Help With this script plz !! - by Sandiel - 05.06.2012, 12:14
Re: Help With this script plz !! - by awsomedude - 05.06.2012, 21:21

Forum Jump:


Users browsing this thread: 1 Guest(s)