In need of a small script made..
#13

Quote:
Originally Posted by Alex_Obando
Посмотреть сообщение
pawn Код:
new Menu:weaponmenu;
pawn Код:
//CommandText
    if(strcmp(cmdtext, "/buyguns", true) == 0)
    {
    ShowMenuForPlayer(weaponmenu, playerid);
    return 1;
    }
pawn Код:
//FSInit
        weaponmenu = CreateMenu("Weapon Menu", 1, 220.0, 100.0, 150.0, 150.0);
    AddMenuItem(weaponmenu, 0, "9mm Weapon");
    AddMenuItem(weaponmenu, 0, "Silenced 9mm Weapon");
    AddMenuItem(weaponmenu, 0, "Desert Eagle Weapon");
    AddMenuItem(weaponmenu, 0, "Shotgun Weapon");
    AddMenuItem(weaponmenu, 0, "Sawnoff Shotgun Weapon");
    AddMenuItem(weaponmenu, 0, "Combat Shotgun Weapon");
    AddMenuItem(weaponmenu, 0, "Micro SMG (Uzi)Weapon");
    AddMenuItem(weaponmenu, 0, "SMG (MP5) Weapon");
    AddMenuItem(weaponmenu, 0, "AK47 (Kalashnikov)Weapon");
    AddMenuItem(weaponmenu, 0, "M4 Weapon");
    AddMenuItem(weaponmenu, 0, "Tec9 Weapon");
pawn Код:
public OnPlayerSelectedMenuRow(playerid, row)
{
    new Menu:CurrentMenu = GetPlayerMenu(playerid);
    if(CurrentMenu == weaponmenu)
    {
        switch(row)
        {
            case 0: //9mm
            {
                GivePlayerWeapon(playerid, 22 , 500);
                GivePlayerMoney(playerid, -500);
                SendClientMessage(playerid, LIGHT_BLUE, "Enjoy your 9mm!");
               
            }
            case 1: //Silenced 9mm
            {
                GivePlayerWeapon(playerid, 23 , 500);
                GivePlayerMoney(playerid, -500);
                SendClientMessage(playerid, LIGHT_BLUE, "Enjoy your Silenced 9mm!");
               
            }
            case 2: //Desert Eagle
            {
                GivePlayerWeapon(playerid, 24 , 500);
                GivePlayerMoney(playerid, -500);
                SendClientMessage(playerid, LIGHT_BLUE, "Enjoy your Desert Eagle!");
           
            }
            case 3: //Shotgun
            {
                GivePlayerWeapon(playerid, 25 , 500);
                GivePlayerMoney(playerid, -500);
                SendClientMessage(playerid, LIGHT_BLUE, "Enjoy your Shotgun!!");
            }
            case 4: //Sawnoff Shotgun
            {
                GivePlayerWeapon(playerid, 26 , 500);
                GivePlayerMoney(playerid, -500);
                SendClientMessage(playerid, LIGHT_BLUE, "Enjoy your Sawnoff Shotgun!");
            }
            case 5: //Combat Shotgun
            {
                GivePlayerWeapon(playerid, 27 , 500);
                GivePlayerMoney(playerid, -500);
                SendClientMessage(playerid, LIGHT_BLUE, "Enjoy your Combat Shotgun!");
            }
            case 6: //Micro SMG (Uzi)
            {
                GivePlayerWeapon(playerid, 28 , 500);
                SendClientMessage(playerid, LIGHT_BLUE, "Enjoy your Micro SMG (Uzi)!");
            }
            case 7: //SMG (MP5)
            {
                GivePlayerWeapon(playerid, 29 , 500);
                GivePlayerMoney(playerid, -500);
                SendClientMessage(playerid, LIGHT_BLUE, "Enjoy your SMG (MP5)!");
                }
            case 8: //AK47 (Kalashnikov)
            {
                GivePlayerWeapon(playerid, 30 , 500);
                GivePlayerMoney(playerid, -500);
                SendClientMessage(playerid, LIGHT_BLUE, "Enjoy your AK47 !");
            }
            case 9: //M4
            {
                GivePlayerWeapon(playerid, 31 , 500);
                GivePlayerMoney(playerid, -500);
                SendClientMessage(playerid, LIGHT_BLUE, "Enjoy your M4!");
            }
            case 10: //Tec9
            {
                GivePlayerWeapon(playerid, 32 , 500);
                GivePlayerMoney(playerid, -500);
                SendClientMessage(playerid, LIGHT_BLUE, "Enjoy your Tec9!");
            }
        }
    }
    return 1;
}
You can change weapons price by changing the number below:

GivePlayerMoney(playerid, -500);

Make sure to use the - (It'll remove the cash)
EDIT:
It kinda works, thanks. But I cant use the mouse to go through the Menu. I have to use W and D or Up and Down hen Space
Reply


Messages In This Thread
In need of a small script made.. - by Jack_Leslie - 05.06.2011, 10:38
Re: In need of a small script made.. - by CoaPsyFactor - 05.06.2011, 12:57
Re: In need of a small script made.. - by Jack_Leslie - 05.06.2011, 13:48
Re: In need of a small script made.. - by CoaPsyFactor - 05.06.2011, 16:24
Re: In need of a small script made.. - by CoaPsyFactor - 05.06.2011, 16:56
Re: In need of a small script made.. - by Jack_Leslie - 06.06.2011, 00:59
AW: Re: In need of a small script made.. - by Lilcuete - 06.06.2011, 01:38
Re: In need of a small script made.. - by Jack_Leslie - 06.06.2011, 01:54
Re: In need of a small script made.. - by Jack_Leslie - 06.06.2011, 02:55
Re: In need of a small script made.. - by ScottCFR - 06.06.2011, 02:59
Re: In need of a small script made.. - by Jack_Leslie - 06.06.2011, 03:04
Respuesta: In need of a small script made.. - by Alex_Obando - 06.06.2011, 03:05
Re: Respuesta: In need of a small script made.. - by Jack_Leslie - 06.06.2011, 03:15
Re: In need of a small script made.. - by CoaPsyFactor - 06.06.2011, 14:18

Forum Jump:


Users browsing this thread: 2 Guest(s)