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

Hear enemys radio if standing close


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Obbin
Senior Member
Join Date: Mar 2005
Location: 192.168.1.3
Old 12-22-2005 , 07:26   Hear enemys radio if standing close
Reply With Quote #1

Id like a plugin that made so when you stand near to an enemy you could hear his radio commands!
__________________
Sig(h)!
Obbin is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 12-22-2005 , 09:31  
Reply With Quote #2

I've thought of this before, maybe I'll attempt to make it when I get my server or have access to one.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 12-22-2005 , 14:53  
Reply With Quote #3

Done:
Code:
// #include <amxmodx> #define MAX_DISTANCE 300 #define CMD_NUM 22 new const CMD[CMD_NUM][] = {     "Cover_me",     "You_take_the_point",     "Hold_this_position",     "Regroup_team",     "Follow_me",     "Taking_fire",     "Go_go_go",     "Team_fall_back",     "Stick_together_team",     "Get_in_position_and_wait",     "Storm_the_front",     "Report_in_team",     "Affirmative",     "Roger_that",     "Enemy_spotted",     "Need_backup",     "Sector_clear",     "In_position",     "Reporting_in",     "Get_out_of_there",     "Negative",     "Enemy_down" } new const RADIO[CMD_NUM][] = {     "ct_coverme",     "takepoint",     "position",     "regroup",     "followme",     "fireassis",     "com_go",     "fallback",     "sticktog",     "com_getinpos",     "stormfront",     "com_reportin",     "ct_affirm",     "roger",     "ct_enemys",     "ct_backup",     "clear",     "ct_inpos",     "ct_reportingin",     "blow",     "negative",     "enemydown" } public plugin_init() {     register_plugin("Real Radio", "0.1x1b3", "VEN")     register_event("TextMsg", "event_radio", "bc", "3=#Game_radio", "5!#Fire_in_the_hole") } public event_radio() {     new name[32]     read_data(4, name, 31)     new id = get_user_index(name)     new command[32]     read_data(5, command, 31)     new i     for (i = 0; i < CMD_NUM; ++i) {         if (equal(command[1], CMD[i]))             break     }     if (i == CMD_NUM)         return     new origin[3], origin2[3]     get_user_origin(id, origin)     new team[10]     team = (get_user_team(id) == 2) ? "TERRORIST" : "CT"     new players[32], num     get_players(players, num, "ace", team)     for (new j = 0; j < num; ++j) {         get_user_origin(players[j], origin2)         if (get_distance(origin, origin2) < MAX_DISTANCE)             client_cmd(players[j], "spk ^"radio/%s^"", RADIO[i])     } }

You can change MAX_DISTANCE if you wish.

EDIT: 2 times
VEN is offline
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 12-22-2005 , 17:22  
Reply With Quote #4

Quote:
Originally Posted by v3x
I've thought of this before, maybe I'll attempt to make it when I get my server or have access to one.
Mines open for bussiness.
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
VEN
Veteran Member
Join Date: Jan 2005
Old 12-23-2005 , 01:52  
Reply With Quote #5

This is more realistic version with emit_sound which cause echoes though:
Code:
// #include <amxmodx> #define CMD_NUM 22 new const CMD[CMD_NUM][] = {     "Cover_me",     "You_take_the_point",     "Hold_this_position",     "Regroup_team",     "Follow_me",     "Taking_fire",     "Go_go_go",     "Team_fall_back",     "Stick_together_team",     "Get_in_position_and_wait",     "Storm_the_front",     "Report_in_team",     "Affirmative",     "Roger_that",     "Enemy_spotted",     "Need_backup",     "Sector_clear",     "In_position",     "Reporting_in",     "Get_out_of_there",     "Negative",     "Enemy_down" } new const RADIO[CMD_NUM][] = {     "radio/ct_coverme.wav",     "radio/takepoint.wav",     "radio/position.wav",     "radio/regroup.wav",     "radio/followme.wav",     "radio/fireassis.wav",     "radio/com_go.wav",     "radio/fallback.wav",     "radio/sticktog.wav",     "radio/com_getinpos.wav",     "radio/stormfront.wav",     "radio/com_reportin.wav",     "radio/ct_affirm.wav",     "radio/roger.wav",     "radio/ct_enemys.wav",     "radio/ct_backup.wav",     "radio/clear.wav",     "radio/ct_inpos.wav",     "radio/ct_reportingin.wav",     "radio/getout.wav",     "radio/negative.wav",     "radio/enemydown.wav" } public plugin_precache() {     for (new i = 0; i < CMD_NUM; ++i)         precache_sound(RADIO[i]) } public plugin_init() {     register_plugin("Real Radio", "0.1b2", "VEN")     register_event("TextMsg", "event_radio", "bc", "3=#Game_radio", "5!#Fire_in_the_hole") } public event_radio() {     new name[32]     read_data(4, name, 31)     new id = get_user_index(name)     new command[32], i     read_data(5, command, 31)     for (i = 0; i < CMD_NUM; ++i) {         if (equal(command[1], CMD[i]))             break     }     if (i == CMD_NUM)         return     emit_sound(id, CHAN_AUTO, RADIO[i], VOL_NORM, ATTN_NORM, 0, PITCH_NORM) }
VEN is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 12-23-2005 , 03:34  
Reply With Quote #6

Quote:
Originally Posted by v3x
I've thought of this before, maybe I'll attempt to make it when I get my server or have access to one.
lawl
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Obbin
Senior Member
Join Date: Mar 2005
Location: 192.168.1.3
Old 12-23-2005 , 09:52  
Reply With Quote #7

thx ven!

EDIT:
Could you help me combining this width my modified version of v3x' Hostage down! radio plugin. (just adding that sound too)
I think this is the best to use for "capturing" who is sending the radio command:

Code:
    register_event("TextMsg","host_killed","b","2&#Killed_Hostage")


Code:
#include <amxmodx> #include <cstrike> #define PLUGIN    "Hostage Down (v3x)" #define VERSION    "1.0" #define AUTHOR    "Obbin" new g_szSoundFile[] = "radio/hosdown.wav" public plugin_init() {     register_plugin(PLUGIN,VERSION,AUTHOR)     register_event("TextMsg","host_killed","b","2&#Killed_Hostage") } public host_killed(id) {     new CsTeams:iTeam = cs_get_user_team(id)     new aPlayers[32],iNum,i     switch(iTeam)     {         case CS_TEAM_CT:         {             get_players(aPlayers,iNum,"ce","CT")         }         case CS_TEAM_T:         {             get_players(aPlayers,iNum,"ce","TERRORIST")           }     }     new name[32]     get_user_name(id,name,31)     for( i=0; i<=iNum; i++)     {         client_cmd(aPlayers[i],"spk %s",g_szSoundFile)         client_print(aPlayers[i],print_chat,"%s (RADIO): Hostage down!",name)     } }
__________________
Sig(h)!
Obbin is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 12-23-2005 , 13:21  
Reply With Quote #8

Quote:
Code:
#define AUTHOR    "Obbin"
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 12-23-2005 , 13:41  
Reply With Quote #9

lol a least he put you in the pluginname :)
VEN is offline
Obbin
Senior Member
Join Date: Mar 2005
Location: 192.168.1.3
Old 12-24-2005 , 12:11  
Reply With Quote #10

Back to topic?
Could someone help me add this custom radio command to the plugin?


heh look at host_killed() func, its remade.
BTW: its for private use anyway
__________________
Sig(h)!
Obbin 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 14:14.


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