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

PAIN_SOUND help pls


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MiZi
New Member
Join Date: Oct 2011
Old 10-02-2011 , 20:19   PAIN_SOUND help pls
Reply With Quote #1

What us wrong here please?. I make this plugin with PAIN_SOUND, and DEATH_SOUND but it not works. Please Help me.
Quote:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>
#include <zombieplague>

#define PLUGIN "Zombie"
#define VERSION "1.0"
#define AUTHOR "MiZi"


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("Damage", "PAIN_SOUND", "b", "2!0", "3=0", "4!0")
register_event("DeathMsg","DEATH_SOUND","a")
}
// Zombie Attributes
new const zclass_name[] = { "Zombie" }
new const zclass_info[] = { "Super schopnosti" }
new const zclass_model[] = { "zombie_source" }
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" }
new const PAIN_SOUND[] = { "infection_6.wav" }
new const DEATH_SOUND[] = { "zombie_die1.wav" }
const zclass_health = 6000
const zclass_speed = 300
const Float:zclass_gravity = 0.8
const Float:zclass_knockback = 1.0

/*============================================ ================================*/

public plugin_precache()
{

// Register class
zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
engfunc(EngFunc_PrecacheSound, PAIN_SOUND)
engfunc(EngFunc_PrecacheSound, DEATH_SOUND)
}
public Pain_sound(id)
{
client_cmd(id, "spk %s", PAIN_SOUND)
}
public Death_sound(id)
{
new attacker = read_data(1)
new victim = read_data(2)

client_cmd(attacker, "spk %s", DEATH_SOUND)
client_cmd(victim, "spk %s", DEATH_SOUND)
}
MiZi is offline
enjoi.
Veteran Member
Join Date: Mar 2011
Old 10-02-2011 , 20:49   Re: PAIN_SOUND help pls
Reply With Quote #2

what is the error.
__________________
Block Maker v6.0 []
Point Slay v3.0 []
Contact [ PM ]
enjoi. is offline
MiZi
New Member
Join Date: Oct 2011
Old 10-03-2011 , 01:52   Re: PAIN_SOUND help pls
Reply With Quote #3

Quote:
Originally Posted by enjoi. View Post
what is the error.
I dont know, it will compile it normally, but it not works in game...
MiZi is offline
mix97mix
Member
Join Date: Sep 2011
Old 10-03-2011 , 08:54   Re: PAIN_SOUND help pls
Reply With Quote #4

I think it's ok?
But i don't see errors o.O
mix97mix is offline
Send a message via MSN to mix97mix Send a message via Skype™ to mix97mix
Old 10-03-2011, 08:55
mix97mix
This message has been deleted by mix97mix.
mix97mix
Member
Join Date: Sep 2011
Old 10-03-2011 , 08:58   Re: PAIN_SOUND help pls
Reply With Quote #5

Try this?

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>
#include <zombieplague>

#define PLUGIN "Zombie"
#define VERSION "1.0"
#define AUTHOR "MiZi"


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("Damage", "PAIN_SOUND", "b", "2!0", "3=0", "4!0")
register_event("DeathMsg","DEATH_SOUND","a")
}
// Zombie Attributes
new const zclass_name[] = { "Zombie" }
new const zclass_info[] = { "Super schopnosti" }
new const zclass_model[] = { "zombie_source" }
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" }
new const PAIN_SOUND[] = { "infection_6.wav" }
new const DEATH_SOUND[] = { "zombie_die1.wav" }
const zclass_health = 6000
const zclass_speed = 300
const Float:zclass_gravity = 0.8
const Float:zclass_knockback = 1.0

/*============================================ ================================*/

public plugin_precache()
{

// Register class
zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
engfunc(EngFunc_PrecacheSound, PAIN_SOUND)
engfunc(EngFunc_PrecacheSound, DEATH_SOUND)
}
public PAIN_SOUND(id)
{
client_cmd(id, "spk %s", PAIN_SOUND)
}
public DEATH_SOUND(id)
{
new attacker = read_data(1)
new victim = read_data(2)

client_cmd(attacker, "spk %s", DEATH_SOUND)
client_cmd(victim, "spk %s", DEATH_SOUND)
}
mix97mix is offline
Send a message via MSN to mix97mix Send a message via Skype™ to mix97mix
MiZi
New Member
Join Date: Oct 2011
Old 10-03-2011 , 10:05   Re: PAIN_SOUND help pls
Reply With Quote #6

omg.. it dont works again....i dont understand...
MiZi is offline
Menethil
Senior Member
Join Date: Aug 2011
Old 10-03-2011 , 11:08   Re: PAIN_SOUND help pls
Reply With Quote #7

try "spk zombie_die1.wav" in ur client console , if there is no sound, the sound is bad, try use another HZ, or use another converter or w/e.
Menethil is offline
Stereo
Veteran Member
Join Date: Dec 2010
Old 10-03-2011 , 13:31   Re: PAIN_SOUND help pls
Reply With Quote #8

With spk only the player hear the sound, with emit_sound the sound emits in the position of the player:

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>

#define PLUGIN "Zombie Pain Sounds"
#define VERSION "1.0"
#define AUTHOR "MiZi"

// Zombie Attributes
new const zclass_name[] = { "Zombie" }
new const 
zclass_info[] = { "Super schopnosti" }
new const 
zclass_model[] = { "zombie_source" }
new const 
zclass_clawmodel[] = { "v_knife_zombie.mdl" }
const 
zclass_health 6000
const zclass_speed 300
const Float:zclass_gravity 0.8
const Float:zclass_knockback 1.0

/**Sounds**/
new const PAIN_SOUND[] = "infection_6.wav"
new const DEATH_SOUND[] = "zombie_die1.wav"

/*============================================ ================================*/

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("Damage""emit_painsound""b""2!0""3=0""4!0")
    
register_event("DeathMsg","emit_deathsound","a")
}

public 
plugin_precache()
{
    
// Register class
    
zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)
    
engfunc(EngFunc_PrecacheSoundPAIN_SOUND)
    
engfunc(EngFunc_PrecacheSoundDEATH_SOUND)
}

public 
emit_painsound(id)
    
emit_sound(idCHAN_AUTOPAIN_SOUND1.0ATTN_NORM0PITCH_NORM)

public 
emit_deathsound(id)
{
    new 
victim read_data(2)
    
emit_sound(victimCHAN_AUTODEATH_SOUND1.0ATTN_NORM0PITCH_NORM)

Stereo is offline
MiZi
New Member
Join Date: Oct 2011
Old 10-03-2011 , 17:50   Re: PAIN_SOUND help pls
Reply With Quote #9

Many thanx bro.
MiZi is offline
Reply



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 07:01.


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