AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Store ammo in memory for later use (https://forums.alliedmods.net/showthread.php?t=164202)

avril-lavigne 08-08-2011 12:38

Store ammo in memory for later use
 
Conditions:
1.Two custom weapons
2.Block buy.remove all buyzones.
3.Refill ammo only thru touching certain entity+model.

Scenario:

I touch the entity and it gives me ammo with certain CSW_ index for 1st weapon. (like ....bpammo(id,CSW_DEAGLE,20))

Than I touch another entity and it gives me ammo for the second weapon.

But - If I dont HAVE that weapon. I need to store given bpammo and CSW index for that weapon for later use - As soon As I find and pick up second weapon. and then It will add me ammo for the second weapon

Is that clear.. I know my english is bad.

how to do that

Exolent[jNr] 08-08-2011 12:40

Re: Store ammo in memory for later use
 
In all weapons except grenades (HE, flash, smoke), you can set the player's BP ammo for that weapon without them having the weapon.
When they finally get the weapon, they will still have their BP ammo from before.

avril-lavigne 08-08-2011 12:40

Re: Store ammo in memory for later use
 
really ? I will try. thanks for fast answer

avril-lavigne 08-08-2011 16:13

Re: Store ammo in memory for later use
 
hm I tried a few times/ When I have a gun - yes it gives me +25 ammo
but If I pick up ammo and than find a Gun. I have standart amount of ammo given with the gun, not + those 25 bpammo... so I need to store it somehow.

JoKeR LauGh 08-13-2011 02:34

Re: Store ammo in memory for later use
 
you use

PHP Code:

cs_set_user_bpammo (index weapon amount

right? well search it here then

http://www.amxmodx.org/funcwiki.php?...ammo&go=search


All times are GMT -4. The time now is 03:21.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.