AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Solved [Help][TF2] Getting the Current Clip of the Player's Weapon (https://forums.alliedmods.net/showthread.php?t=329775)

J0BL3SS 01-07-2021 12:13

[Help][TF2] Getting the Current Clip of the Player's Weapon
 
Although I searched the forum, I only found solutions for CSGO and these actions do not work in TF2 apparently. I need some help.

StrikeR14 01-07-2021 15:52

Re: [Help][TF2] Getting the Current Clip of the Player's Weapon
 
Try

PHP Code:

int clip GetEntProp(iWeaponProp_Data"m_iClip1"); 

iWeapon is the entity index of the weapon.

J0BL3SS 01-07-2021 15:54

Re: [Help][TF2] Getting the Current Clip of the Player's Weapon
 
Quote:

Originally Posted by StrikeR14 (Post 2731713)
Try

PHP Code:

int clip GetEntProp(iWeaponProp_Data"m_iClip1"); 

iWeapon is the entity index of the weapon.

Well i will try it thanks. But it does it gives current clip or base clip size?

StrikeR14 01-07-2021 16:09

Re: [Help][TF2] Getting the Current Clip of the Player's Weapon
 
Quote:

Originally Posted by J0BL3SS (Post 2731714)
does it gives current clip or base clip size?

The exact amount of bullets you have in the clip when you execute the code.

J0BL3SS 01-07-2021 16:10

Re: [Help][TF2] Getting the Current Clip of the Player's Weapon
 
Quote:

Originally Posted by StrikeR14 (Post 2731717)
There's a difference between ammo and clip though.

i'm trying to get current clip of player, not the base clip though. like scattergun's base clip is 6 bullet
is there any difference between them?

J0BL3SS 01-07-2021 16:13

Re: [Help][TF2] Getting the Current Clip of the Player's Weapon
 
Quote:

Originally Posted by StrikeR14 (Post 2731718)
The exact amount of bullets you have in the clip when you execute the code.

well thanks again.


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

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