AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] Setting user's weapon ammo (https://forums.alliedmods.net/showthread.php?t=108769)

Excalibur.007 11-09-2009 08:54

[HELP] Setting user's weapon ammo
 
I used this(in cstrike.inc)
Code:

native cs_set_weapon_ammo(index, newammo);
In my code it is shown like this
Code:

cs_set_weapon_ammo(CSW_SCOUT, 0);
When I host a room, it shows 0 ammo but the weapon still have 10 bullets.
Or i can only set a minimum of 1?

Exolent[jNr] 11-09-2009 08:55

Re: [HELP] Setting user's weapon ammo
 
index is the weapon entity, not the weapon type.

Excalibur.007 11-09-2009 09:44

Re: [HELP] Setting user's weapon ammo
 
Oh didn't notice that. Thanks.
EDIT: It compiles fine but still same thing. Shows 0 ammo but the user still can shoot 10 bullets(Scout)


All times are GMT -4. The time now is 17:46.

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