Raised This Month: $32 Target: $400
 8% 

[ZP] Class: Chainsaw Zombie (Sound problem)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CoCe16
Junior Member
Join Date: Dec 2013
Old 05-30-2019 , 12:26   [ZP] Class: Chainsaw Zombie (Sound problem)
Reply With Quote #1

Hello beautiful ones!

I just added this Zombie Class to my server and found out that these included chainsaw sounds were automatically played for all my installed zombie classes.

i would really appreciate if there is some missing code to add to make these chainsaw sounds available only for the Chainsaw class itself! its kinda funny hearing Classic Zombie running around with chainsaw sounds however, the plugin works fine and is very cool but its just this problem that must be fixed

anyways if someone is willing to help me to make this possible, i'll upload the SMA below.

thanks alot and peace
Attached Files
File Type: sma Get Plugin or Get Source (zp_chainsaw_zombie.sma - 243 views - 2.9 KB)
CoCe16 is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-30-2019 , 12:42   Re: [ZP] Class: Chainsaw Zombie (Sound problem)
Reply With Quote #2

The check for the classid is missing from fw_EmitSound function.
Add this after the other checks in there:
PHP Code:
|| zp_get_user_zombie_class(id) != g_zclassid1 
__________________
<VeCo> is offline
CoCe16
Junior Member
Join Date: Dec 2013
Old 05-30-2019 , 13:14   Re: [ZP] Class: Chainsaw Zombie (Sound problem)
Reply With Quote #3

wow it works perfectly fine now! im so happy someone replied so fas thanks alot VeCo!!
CoCe16 is offline
CoCe16
Junior Member
Join Date: Dec 2013
Old 05-30-2019 , 13:51   Re: [ZP] Class: Chainsaw Zombie (Sound problem)
Reply With Quote #4

hello again! After having the sounds fixed just realized that the Chainsaw Class is blocking the damage dealt to the whole server, when a ZM hits a human it doesnt take any damage at all, anyways i inactivated the Chainsaw class and the damage worked again for all zombies.. so i wonder what possbile could cause this kind of damage error, here is a part of the SMA 'TakeDamage';


public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
{
if (zp_get_user_nemesis(attacker) || !zp_get_user_zombie(attacker))
return HAM_IGNORED;

if (get_user_weapon(attacker) != CSW_KNIFE)
return HAM_IGNORED;

if (zp_get_user_zombie_class(attacker) == g_zclassid1)
{
damage *= get_pcvar_float(cvar_damage)
SetHamParamFloat(4, damage)
}
CoCe16 is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-30-2019 , 14:03   Re: [ZP] Class: Chainsaw Zombie (Sound problem)
Reply With Quote #5

Jeez. Change HAM_SUPERCEDE to HAM_IGNORED.
__________________
<VeCo> is offline
CoCe16
Junior Member
Join Date: Dec 2013
Old 05-30-2019 , 15:11   Re: [ZP] Class: Chainsaw Zombie (Sound problem)
Reply With Quote #6

Quote:
Originally Posted by <VeCo> View Post
Jeez. Change HAM_SUPERCEDE to HAM_IGNORED.
Thanks once again lol
CoCe16 is offline
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 21:53.


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