Raised This Month: $ Target: $400
 0% 

Enemy Down! ( Radio )


Post New Thread Reply   
 
Thread Tools Display Modes
Megalomaniac
Junior Member
Join Date: Jul 2005
Location: USA
Old 07-20-2005 , 18:57  
Reply With Quote #11

Perhaps implement a cvar to turn it off?
__________________
If you think v3x is a PIMP, paste this into your sig!
Megalomaniac is offline
Send a message via Yahoo to Megalomaniac
DahVid
Senior Member
Join Date: Jun 2005
Old 07-20-2005 , 19:00  
Reply With Quote #12

CVAR: amx_enemydown

Code:
// (c) 2005 v3x :D #include <amxmodx> #include <cstrike> #define PLUGIN    "Enemy Down" #define VERSION   "1.1" #define AUTHOR    "v3x" new g_iMsgSayText public plugin_init() {     register_plugin(PLUGIN,VERSION,AUTHOR)     register_event("DeathMsg","OnDeath","a","1>0")     g_iMsgSayText = get_user_msgid("SayText")     register_cvar("amx_enemydown","1") } new g_szSoundFile[] = "radio/enemydown.wav" public plugin_precache() {     precache_sound(g_szSoundFile) } public plugin_modules() {     require_module("cstrike") } public OnDeath() {     if(!get_cvar_num("amx_enemydown")) {         return PLUGIN_HANDLED     }     new vID = read_data(2)     new aID = read_data(1)     new CsTeams:iTeam = cs_get_user_team(vID)     new aPlayers[32],iNum,i     new szUsernameV[33],szUsernameA[33]     get_user_name(vID,szUsernameV,32)     get_user_name(aID,szUsernameA,32)     new szMessage[164]     switch(iTeam)     {         case CS_TEAM_T:         {             get_players(aPlayers,iNum,"ce","CT")             for(i=0; i<=iNum; i++)             {                 if(!is_user_connected(aPlayers[i])) continue                 client_cmd(aPlayers[i],"spk %s",g_szSoundFile)                 format(szMessage,163,"^x01%s (RADIO):^x03 Enemy ^x04%s ^x03 down!",szUsernameA,szUsernameV)                 message_begin(MSG_ONE,g_iMsgSayText,{0,0,0},aPlayers[i])                 write_byte(aPlayers[i])                 write_string(szMessage)                 message_end()             }         }         case CS_TEAM_CT:         {             get_players(aPlayers,iNum,"ce","TERRORIST")             for(i=0; i<=iNum; i++)             {                 if(!is_user_connected(aPlayers[i])) continue                 client_cmd(aPlayers[i],"spk %s",g_szSoundFile)                 format(szMessage,163,"^x01%s (RADIO):^x03 Enemy ^x04%s ^x03 down!",szUsernameA,szUsernameV)                 message_begin(MSG_ONE,g_iMsgSayText,{0,0,0},aPlayers[i])                 write_byte(aPlayers[i])                 write_string(szMessage)                 message_end()             }         }     }         return PLUGIN_CONTINUE }
DahVid is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 07-21-2005 , 01:21  
Reply With Quote #13

Here's one for ya to test..

Cvars:
amx_edown <0|1>
- Turns the plugins on/off (Default: 1)
amx_edown_min <0-32>
- Minimum # of players til plugin kicks in (Default: 0)
Attached Files
File Type: sma Get Plugin or Get Source (enemy_down.sma - 1155 views - 2.7 KB)
__________________
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
Agret
Member
Join Date: Jan 2005
Location: Melbourne, Victoria
Old 07-23-2005 , 23:22  
Reply With Quote #14

Quote:
Originally Posted by v3x
Here's one for ya to test..

Cvars:
amx_edown <0|1>
- Turns the plugins on/off (Default: 1)
amx_edown_min <0-32>
- Minimum # of players til plugin kicks in (Default: 0)
I think amx_edown_max should be added too. The max number of players ALIVE before it STOPS working.
__________________

(¯`·._¤²°°²Agret²°°²¤_.·´¯)
¸.-~·*'˜¨¯Ï”m_†hê_ôñë_åñd_õñl¥_Åg®ê†¨˜'*·~-.¸
Agret is offline
Send a message via ICQ to Agret Send a message via AIM to Agret Send a message via MSN to Agret Send a message via Yahoo to Agret
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 07-24-2005 , 06:59  
Reply With Quote #15

I'll figure something out.
__________________
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
RuBBeR-DuCkY
Member
Join Date: Jul 2005
Old 07-27-2005 , 20:50  
Reply With Quote #16

I got a little problem.
Here the problem is.
I just dled it and i got everything to work,
So I restarted my server and it started working.
Once I changed maps the radio didn't work.
I checked everything and it is where its suppose to be.
Does any1 know why its not wokring right now?
RuBBeR-DuCkY is offline
Riddick51
BANNED
Join Date: Jul 2005
Location: Lincoln, Nebr US
Old 08-04-2005 , 17:39  
Reply With Quote #17

all i added to v3x's enemy_down was:

if (random_num(0,99) < 5) perform enemy_down std routine else plugin continue

so only 5% of total events would be reported, just enuf to add a little interaction on the radio calls

i did that because it would quickly overwhelm my 32 player csdm server.
Riddick51 is offline
Send a message via AIM to Riddick51 Send a message via MSN to Riddick51 Send a message via Yahoo to Riddick51
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 08-08-2005 , 16:53  
Reply With Quote #18

A center message would be neat, at least it wouldn't clutter the screen. ;)

Btw, I'm sorta back, I have very limited time on my pc now, so yea..
__________________
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
leakgfhp
Member
Join Date: Apr 2005
Old 08-08-2005 , 17:48  
Reply With Quote #19

This Command send the radar(blink), and Enemy Down Sound

Code:
//send to all players     new players[32],numplayer     get_players(players,numplayer)     for (new i=0; i<numplayer; i++)     {         new target = players[i]         if (is_valid_ent(target) && is_user_alive(target) && cs_get_user_team(id) == cs_get_user_team(target))         {             Text[65]             format(Text,64,"%%!MRAD_ENEMYDOWN")             message_begin(MSG_ONE, get_user_msgid("SendAudio"), {0,0,0}, target)             write_byte(id);             write_string(Text);             message_end();         }     }
leakgfhp is offline
SubStream
Veteran Member
Join Date: Aug 2005
Location: USA
Old 08-29-2005 , 03:24  
Reply With Quote #20

Edit: Works flawlessly
SubStream 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 15:18.


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