01-27-2025, 11:26 PM
#1
Plugin Zombie Radio For Biohazard Mode
[Image: 5ea788a63f636.png]
Source Code: 

Code: 
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <biohazard>

#define PLUGIN "Simple Zombie Radio"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"

new enabled, disableold

static const radio1_sounds[][] = {
"",
"bio/radio/com_go.wav",
"bio/radio/ct_backup.wav",
"bio/radio/ct_coverme.wav",
"bio/radio/ct_enemys.wav",
"bio/radio/followme.wav",
"bio/radio/fallback.wav",
"bio/radio/hitassist.wav"
}

static const radio1_texts[][] = {
"",
"Zombies, go go go",
"Zombies, need backup",
"Zombies, cover me",
"Zombies, enemy spotted",
"Zombies, follow me",
"Zombies, fall back",
"Zombies, need assistance"
}

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

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

enabled = register_cvar("bio_radio","1")
disableold = register_cvar("bio_radio_disable_old","1")

register_clcmd("radio1","radio1")
register_clcmd("radio2","other_radio_hook")
register_clcmd("radio3","other_radio_hook")
}

public radio1(id)
{
if(!get_pcvar_num(enabled))
return PLUGIN_CONTINUE

if(!is_user_zombie(id) || !is_user_alive(id))
return PLUGIN_CONTINUE

new menu = menu_create("\y Zombie Radio Commands", "radio1_handler")
menu_additem(menu, radio1_texts[1], "1", 0)
menu_additem(menu, radio1_texts[2], "2", 0)
menu_additem(menu, radio1_texts[3], "3", 0)
menu_additem(menu, radio1_texts[4], "4", 0)
menu_additem(menu, radio1_texts[5], "5", 0)
menu_additem(menu, radio1_texts[6], "6", 0)
menu_additem(menu, radio1_texts[7], "7", 0)
menu_addblank(menu, 0)
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)

menu_display(id, menu, 0)

return PLUGIN_HANDLED
}


public radio1_handler(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_cancel(id)
return PLUGIN_HANDLED
}

new data[6]
new access, callback

menu_item_getinfo(menu, item, access, data, 5, _, _, callback)

new key = str_to_num(data)

if(key > 0 && key < sizeof radio1_texts)
{
message(key)
}

menu_cancel(id)
return PLUGIN_HANDLED
}

stock message(key)
{
new players[32], count, name[33]
get_players(players, count, "ch")
for(new id = 0; id <= count; id++)
{
if(is_user_zombie(id) || is_user_connected(id))
{
get_user_name(id,name,32)
client_print(id,print_chat,"%s (RADIO): %s!",name,radio1_texts[key])
client_cmd(id,"spk %s",radio1_sounds[key])
}
}
}

public other_radio_hook(id)
{
return (get_pcvar_num(disableold) && is_user_zombie(id)) ? PLUGIN_HANDLED : PLUGIN_CONTINUE
}


[Image: Counter-Strike-Logo-Resized.png]
This post was last modified: 06-16-2025, 08:05 PM by spincs.

[Image: 61964c-9a2d4019738b4cbaa8d9a71fee4f4930.webp]
eLLectro
01-27-2025, 11:26 PM
#1
Plugin Zombie Radio For Biohazard Mode
[Image: 5ea788a63f636.png]
Source Code: 

Code: 
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <biohazard>

#define PLUGIN "Simple Zombie Radio"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"

new enabled, disableold

static const radio1_sounds[][] = {
"",
"bio/radio/com_go.wav",
"bio/radio/ct_backup.wav",
"bio/radio/ct_coverme.wav",
"bio/radio/ct_enemys.wav",
"bio/radio/followme.wav",
"bio/radio/fallback.wav",
"bio/radio/hitassist.wav"
}

static const radio1_texts[][] = {
"",
"Zombies, go go go",
"Zombies, need backup",
"Zombies, cover me",
"Zombies, enemy spotted",
"Zombies, follow me",
"Zombies, fall back",
"Zombies, need assistance"
}

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

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

enabled = register_cvar("bio_radio","1")
disableold = register_cvar("bio_radio_disable_old","1")

register_clcmd("radio1","radio1")
register_clcmd("radio2","other_radio_hook")
register_clcmd("radio3","other_radio_hook")
}

public radio1(id)
{
if(!get_pcvar_num(enabled))
return PLUGIN_CONTINUE

if(!is_user_zombie(id) || !is_user_alive(id))
return PLUGIN_CONTINUE

new menu = menu_create("\y Zombie Radio Commands", "radio1_handler")
menu_additem(menu, radio1_texts[1], "1", 0)
menu_additem(menu, radio1_texts[2], "2", 0)
menu_additem(menu, radio1_texts[3], "3", 0)
menu_additem(menu, radio1_texts[4], "4", 0)
menu_additem(menu, radio1_texts[5], "5", 0)
menu_additem(menu, radio1_texts[6], "6", 0)
menu_additem(menu, radio1_texts[7], "7", 0)
menu_addblank(menu, 0)
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)

menu_display(id, menu, 0)

return PLUGIN_HANDLED
}


public radio1_handler(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_cancel(id)
return PLUGIN_HANDLED
}

new data[6]
new access, callback

menu_item_getinfo(menu, item, access, data, 5, _, _, callback)

new key = str_to_num(data)

if(key > 0 && key < sizeof radio1_texts)
{
message(key)
}

menu_cancel(id)
return PLUGIN_HANDLED
}

stock message(key)
{
new players[32], count, name[33]
get_players(players, count, "ch")
for(new id = 0; id <= count; id++)
{
if(is_user_zombie(id) || is_user_connected(id))
{
get_user_name(id,name,32)
client_print(id,print_chat,"%s (RADIO): %s!",name,radio1_texts[key])
client_cmd(id,"spk %s",radio1_sounds[key])
}
}
}

public other_radio_hook(id)
{
return (get_pcvar_num(disableold) && is_user_zombie(id)) ? PLUGIN_HANDLED : PLUGIN_CONTINUE
}


[Image: Counter-Strike-Logo-Resized.png]
This post was last modified: 06-16-2025, 08:05 PM by spincs.

[Image: 61964c-9a2d4019738b4cbaa8d9a71fee4f4930.webp]
02-02-2025, 02:32 PM
#2
Multumim

[Image: bbZgu.png]
mindfreak.
02-02-2025, 02:32 PM
#2
Multumim

[Image: bbZgu.png]
Users browsing this thread: 1 Guest(s)
Powered By MyBB Group © 2026
Made with by ZMBIO.RO