SA-MP Forums Archive
Help with Quick Weapon change - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with Quick Weapon change (/showthread.php?tid=575759)



Help with Quick Weapon change - lwilson - 30.05.2015

How to set the player unable to quick change from his current weapon to his another weapon.

Like you need to click it to your inventory before you can use your another weapon.

I got Inventory System.

Any tutorial?


Re: Help with Quick Weapon change - Yashas - 30.05.2015

Код:
public OnPlayerUpdate(playerid)
{
         if(GetPlayerWeapon(playerid) != WeaponIDFromInventory[playerid])
         {
               SetPlayerArmedWeapon(playerid, WeaponIDFromInventory[playerid]);
         }
}
I gave you an idea, it is up to you to modify it and make it work with your script properly.