Forum
Scripts
Limit grenade ammount -- request
Limit grenade ammount -- request
4 replies
1

I used
playerweapons, which I do not know if it recognizes two flashbangs.Better copy that code into an editor that supports HL. This montone green text is unreadable.
I made 1 flashbang per player and now its ok
edited 1×, last 15.08.20 09:36:39 pm
do not use-------------------------------------------------------------
Another way would be counting the grenades on certain events.
buy and
walkover for increasing.(
attack /
projectile),
drop and
die for decreasing.-------------------------------------------------------------
use this-------------------------------------------------------------
Edit: Okay it is much easier than expected.
You can use
playerammo to retrieve the amount of flashbangs carried.the function p_count_grenades changes minorly by replacing
+ 1with
+ playerammo(p_id, item_id);
edited 2×, last 16.08.20 03:07:40 pm
1

Offline
