AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Wanna know how to set weapon clip (https://forums.alliedmods.net/showthread.php?t=63231)

Dr. T 11-15-2007 09:35

Wanna know how to set weapon clip
 
Hey...
I just wanna kow how to set the clip at weapons... I tried to look in "Awp one shot" and replace "awp" with "m4a1"... But then my cs says that i have one shot in my m4a1 but it first reload after firering 30...
Can someone help me? Plz...

ConnorMcLeod 11-15-2007 11:15

Re: Wanna know how to set weapon clip
 
cs_set_weapon_ammo ( index, 1 ), where index is the index of the entity, not player.
So you have first to get the index of "your" m4a1.

http://www.amxmodx.org/funcwiki.php?go=func&id=208


So for a m4a1 for example :

new entity_index = fm_get_user_weapon_entity(id, CSW_M4A1)
cs_set_weapon_ammo (entity_index, 1 )

Open fakemeta_util to see fm_get_user_weapon_entity source code


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

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