SA-MP Forums Archive
[FilterScript] Simple Weapon System With Commands - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Simple Weapon System With Commands (/showthread.php?tid=411484)



Simple Weapon System With Commands - Krisna - 29.01.2013

This Simple Weapon Menu By Krisna

More Commands :
Weapon Menu
/heal
/armour
/9mm
/shotgun
/mp5
/m4
/sniper
/rocket
/minigun
/timebomb
/camera
/golf
/baseball
/dildo
/grenade
/molotop
/uzi
/deagle
/silenced
/ak47

THANKS~~(TERIMA KASIH)


Re: Simple Weapon System With Commands - Madeline - 29.01.2013

pawn Код:
new price, weaponid, ammo;

    switch(listitem)
    {
        case 0: { price = 1000, weaponid = 6, ammo = 10; }
        case 1: { price = 50, weaponid = 1, ammo = 100; }
        case 2: { price = 1540, weaponid = 23, ammo = 1000; }
       
    }
   
    if(GetPlayerMoney(playerid) < price)
        return SendClientMessage(playerid, 0x0000FFAA, "Sorry, you have no cash. DON'T FOOL ME...");

    GivePlayerMoney(playerid, -price);
    GivePlayerWeapon(playerid, weaponid, ammo);
    SendClientMessage(playerid, 0x00FFFFAA, "Enjoy your new weapon!");
Very simple, if using variables. It is efficient, and reduces duplicating codes. You can also add more things easier. Many users have created a weapon shop system with your same code.


Re: Simple Weapon System With Commands - FiReMaNStone - 30.01.2013

Soo easy to make


Re: Simple Weapon System With Commands - zProfessional - 30.01.2013

ey men use dialog would be better