just one pick...
#1

hello guys after long time i have back on pawno scripting so i need to make the player to can just once to pick weapons so here what i done and what need to do to make that
pawn Код:
CMD:vipguns(playerid, params[])
{
    if(IsPlayerVip[playerid] >= 1)
    {
        ShowPlayerDialog(playerid, vipguns, DIALOG_STYLE_LIST, "Vip Guns", "Sawn-off Shotgun\nTec9\nM4\nAK-47\nSniper\nDesert Eagle\nParachute", "Accept", "Cancel");
        return 1;
    }
    else
    {
        SendClientMessage(playerid, COLOR_WHITE, "You can not use this command. Reason: You are not VIP player.");
        return 1;
    }
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case vipguns:
        {
            if(!response)
            {
                SendClientMessage(playerid, COLOR_ORANGE, "You cancelled.");
                return 1;
            }
            switch(listitem)
            {
                case 0:
                {
                    //Sawn-off Shotgun
                    GivePlayerWeapon(playerid, 26, 500);
                }
                case 1:
                {
                    //tec9
                    GivePlayerWeapon(playerid, 32, 500);
                }
                case 2:
                {
                    //M4
                    GivePlayerWeapon(playerid, 31, 500);
                }
                case 3:
                {
                    //AK-47
                    GivePlayerWeapon(playerid, 30, 500);
                }
                case 4:
                {
                    //sniper
                    GivePlayerWeapon(playerid, 34, 500);
                }
                case 5:
                {
                    //pistol
                    GivePlayerWeapon(playerid, 22, 500);
                }
                case 6:
                {
                    //parachute
                    GivePlayerWeapon(playerid, 46, 500);
                }
                case 7:
                {
                    //MP5
                    GivePlayerWeapon(playerid, 29, 500);
                }
            }
        }
Thanks
Reply


Messages In This Thread
just one pick... - by Rafa - 12.02.2012, 16:57
Re: just one pick... - by Georgi166 - 12.02.2012, 16:59
Re: just one pick... - by Rafa - 12.02.2012, 17:01
Re: just one pick... - by iPLEOMAX - 12.02.2012, 17:04
Re: just one pick... - by Rafa - 12.02.2012, 17:11
Re: just one pick... - by iPLEOMAX - 12.02.2012, 17:34

Forum Jump:


Users browsing this thread: 1 Guest(s)