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

Requst Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mohanad_2022
Member
Join Date: Jan 2022
Location: Palestine
Old 09-16-2022 , 02:40   Requst Plugin
Reply With Quote #1

Hello Guys ,

I try find a plugin on zp server
the plugin system is that play a specific sound "Like : Oh God.wav" when Humans Kill Last Zombie
and when Zombies kill the last human Play the sound "I can't belive it.wav" ,
and on Nemesis rounds , when a human kill any nemesis , play sound "Stay Down.wav"

so guys i hope one help me to creat that plugin , i have the sounds that i mentioned , i just try find the plugin

and i am sure i will find it here , In the end, he came here for help and did not come back disappointed
mohanad_2022 is offline
QuickDroLLL
Senior Member
Join Date: Dec 2021
Location: AMX Mod X Land
Old 09-16-2022 , 11:00   Re: Requst Plugin
Reply With Quote #2

i have created this about month ago:

Quote:
#include <amxmodx>
#include <hamsandwich>
#include <zombieplague>

new DIE_SOUNDS[3][] =
{
"Sound 0 test", // this should be sonud when humans kill any nemesis
"Sound 1 test", // this should be sound when humans kill last zombie
"Sound 2 test" // this should be sound when zombies kill last human
}

public plugin_init()
{
register_plugin("Die Sounds for Zombie Escape", "0.1", "QuickDroLLL")
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
}

public plugin_precache()
{
for(new i; i < sizeof DIE_SOUNDS; i++)
{
precache_sound(DIE_SOUNDS[i])
}
}

public fw_PlayerKilled(victim, attacker)
{
if(!is_user_connected(attacker) || !is_user_alive(attacker))
{
return PLUGIN_HANDLED
}
if(zp_get_user_nemesis(victim))
{
emit_sound(0, CHAN_WEAPON, DIE_SOUNDS[0], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
}
else
{
if(1 > zp_get_zombie_count() && !zp_get_user_nemesis(victim))
{
emit_sound(0, CHAN_WEAPON, DIE_SOUNDS[1], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
}
}
if(1 > zp_get_human_count())
{
emit_sound(0, CHAN_WEAPON, DIE_SOUNDS[2], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
}
return PLUGIN_HANDLED
}
don't forgot adding sounds in your cs sv and edit sound direction in sma.

Last edited by QuickDroLLL; 09-16-2022 at 14:46.
QuickDroLLL is offline
mohanad_2022
Member
Join Date: Jan 2022
Location: Palestine
Old 09-16-2022 , 15:20   Re: Requst Plugin
Reply With Quote #3

Quote:
Originally Posted by QuickDroLLL View Post
i have created this about month ago:



don't forgot adding sounds in your cs sv and edit sound direction in sma.
Dude , you are legend !!!!!!!!
mohanad_2022 is offline
QuickDroLLL
Senior Member
Join Date: Dec 2021
Location: AMX Mod X Land
Old 09-16-2022 , 19:21   Re: Requst Plugin
Reply With Quote #4

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

new DIE_SOUNDS[3][] = {
    
"Sound 0 test"// this should be sonud when humans kill any nemesis
    
"Sound 1 test"// this should be sound when humans kill last zombie
    
"Sound 2 test" // this should be sound when zombies kill last human
}

public 
plugin_init() {
    
register_plugin("Die Sounds for Zombie Escape""0.1""QuickDroLLL")
    
RegisterHam(Ham_Killed"player""fw_PlayerKilled")
}

public 
plugin_precache() {
    for(new 
isizeof DIE_SOUNDSi++) {
        
precache_sound(DIE_SOUNDS[i])
    }
}

public 
fw_PlayerKilled(victimattacker) {
    if(!
is_user_connected(attacker)) {
        return 
PLUGIN_HANDLED
    
}
    if(
zp_get_user_nemesis(victim)) {
        
emit_sound(0CHAN_WEAPONDIE_SOUNDS[0], VOL_NORMATTN_NORM0PITCH_NORM)
    }
    else if(
zp_get_user_last_zombie(victim)) {
        
emit_sound(0CHAN_WEAPONDIE_SOUNDS[1], VOL_NORMATTN_NORM0PITCH_NORM)
    }
    else if(
zp_get_user_last_human(victim)) {
        
emit_sound(0CHAN_WEAPONDIE_SOUNDS[2], VOL_NORMATTN_NORM0PITCH_NORM)
    }
    return 
PLUGIN_HANDLED

i have edited to code try this instend the first one

Last edited by QuickDroLLL; 09-18-2022 at 07:05.
QuickDroLLL is offline
mohanad_2022
Member
Join Date: Jan 2022
Location: Palestine
Old 09-17-2022 , 13:51   Re: Requst Plugin
Reply With Quote #5

Quote:
Originally Posted by QuickDroLLL View Post
i have created this about month ago:



don't forgot adding sounds in your cs sv and edit sound direction in sma.
Great work my friend but just simple edite :

public plugin_precache()
{
for(new i; i < sizeof DIE_SOUNDS; i++)
{
precache_model(DIE_SOUNDS[i])
}
}




edited to


public plugin_precache()
{
for(new i; i < sizeof DIE_SOUNDS; i++)
{
precache_sound(DIE_SOUNDS[i])
}
}
mohanad_2022 is offline
QuickDroLLL
Senior Member
Join Date: Dec 2021
Location: AMX Mod X Land
Old 09-18-2022 , 07:02   Re: Requst Plugin
Reply With Quote #6

Quote:
Originally Posted by mohanad_2022 View Post
Great work my friend but just simple edite :

public plugin_precache()
{
for(new i; i < sizeof DIE_SOUNDS; i++)
{
precache_model(DIE_SOUNDS[i])
}
}




edited to


public plugin_precache()
{
for(new i; i < sizeof DIE_SOUNDS; i++)
{
precache_sound(DIE_SOUNDS[i])
}
}
yeah me mistake. you can add rewards in the same plugin like when nemesis got killed who kill him got exp or ammopacks enjoy !
QuickDroLLL 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 17:22.


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