Raised This Month: $12 Target: $400
 3% 

Displays the wrong value of the clip ammo


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Xpym4uk76
Junior Member
Join Date: Feb 2019
Location: Ukraine
Old 02-13-2022 , 05:26   Displays the wrong value of the clip ammo
Reply With Quote #1

I have a problem with zp weapon. When I drop it on the floor and get it up again, sometimes it shows 0 bullets in clip ammo, sometimes shows correct. I dont know how to fix it, i tried to fix it, tried to set manualy the clip ammo on giving and geting weapon, its doesnt helps. Please help me fix that problem

Its only visual bug!
Attached Files
File Type: sma Get Plugin or Get Source (azp_weapon_m32_venom.sma - 73 views - 24.5 KB)
Xpym4uk76 is offline
Uzviseni Bog
Senior Member
Join Date: Jun 2020
Old 02-13-2022 , 17:54   Re: Displays the wrong value of the clip ammo
Reply With Quote #2

Add a Plugin that forbids throwing weapons
Uzviseni Bog is offline
Old 02-14-2022, 15:51
Xpym4uk76
This message has been deleted by Xpym4uk76.
Xpym4uk76
Junior Member
Join Date: Feb 2019
Location: Ukraine
Old 02-14-2022 , 15:52   Re: Displays the wrong value of the clip ammo
Reply With Quote #3

Quote:
Originally Posted by Uzvseni Bog View Post
Add a Plugin that forbids throwing weapons
GENIUS!
Xpym4uk76 is offline
AdrenalinesWrath
Junior Member
Join Date: Aug 2017
Old 02-14-2022 , 18:50   Re: Displays the wrong value of the clip ammo
Reply With Quote #4

well, maybe remove the return plugin_supercede which is found here:

Code:
public fw_Item_Deploy_Post(weapon_ent)
{
	new owner = pev(weapon_ent,pev_owner)
	if(is_user_alive(owner) && get_user_weapon(owner) == CSW_BASE && g_has_M32[owner])
		Set_Player_Zoom(owner, 0)
	
	static weaponid; weaponid = cs_get_weapon_id(weapon_ent)
	if(is_user_alive(owner)) replace_weapon_models(owner, weaponid)
	
	new id = get_pdata_cbase(weapon_ent, 41, 4)
	if (!g_has_M32[id] || !is_user_alive(id)) return HAM_IGNORED
    static Ent; Ent = fm_get_user_weapon_entity(id, CSW_BASE)
    static iClip; iClip = get_pdata_int(Ent, 51, 4)
    new ammo, clip, weapon = get_user_weapon(id, clip, ammo)
	server_print("CLIP %d AMMO %d", iClip, ammo)
	return HAM_SUPERCEDE
}
actually:

Code:
public fw_Item_Deploy_Post(weapon_ent)
{
	static owner;owner = pev(weapon_ent,pev_owner)
	static weaponid; weaponid = cs_get_weapon_id(weapon_ent)
	if(is_user_alive(owner){
		if(get_user_weapon(owner) == CSW_BASE && g_has_M32[owner]) {
			Set_Player_Zoom(owner, 0)
		}
		replace_weapon_models(owner, weaponid)
	}
}
__________________
"True Strength's keeping everything together, while everyone expects you to fall apart."

Last edited by AdrenalinesWrath; 02-14-2022 at 18:53.
AdrenalinesWrath is offline
Old 02-15-2022, 05:34
AnimalMonster
This message has been deleted by AnimalMonster. Reason: Nvm
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:04.


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