AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   REQ: Frags left annouce. (3frags left, 2 frags left.. Q3 style) (https://forums.alliedmods.net/showthread.php?t=123715)

hcxx 04-08-2010 07:51

REQ: Frags left annouce. (3frags left, 2 frags left.. Q3 style)
 
1 Attachment(s)
I'm running HLDM Server whit mp_fraglimit 200, Id like to have a plugin what annouce frags left when fraglimit will be set, eg when there is 197frags left then it will play 3frags left sound when 2 frags left then it will play 2 frags left sound and annouce it in hud eg

Player - 3 frags left.. and so on. I have attatched the wave files allso.

xPaw 04-08-2010 08:27

Re: REQ: Frags left annouce. (3frags left, 2 frags left.. Q3 style)
 
Try this.
Code:
#include < amxmodx > new g_pFragLimit; public plugin_init( ) {     register_plugin( "Frags Left Announcer", "1.0", "xPaw" );         register_event( "DeathMsg", "EventDeathMsg", "a", "2>0" );         g_pFragLimit = get_cvar_pointer( "mp_fraglimit" ); //  g_pFragLimit = register_cvar( "mp_fraglimit", "5" ); // The cvar doesn't exist in CS } public plugin_precache( ) {     precache_sound( "sound/misc/1frag.wav" );     precache_sound( "sound/misc/2frags.wav" );     precache_sound( "sound/misc/3frags.wav" ); } public EventDeathMsg( ) {     new iFragLimit = get_pcvar_num( g_pFragLimit ) - 3;         if( iFragLimit > 0 ) {         new iKiller = read_data( 1 ),             iFrags  = get_user_frags( iKiller ) + 1;                 if( iFrags >= iFragLimit ) {             iFrags = iFragLimit - iFrags + 3;                         if( !iFrags ) {                 new szName[ 32 ];                 get_user_name( iKiller, szName, 31 );                                 set_hudmessage( 128, 128, 128, -1.0, 0.15, 0, 10.0, 10.0, 0.2, 0.2, 2 );                 show_hudmessage( 0, "%s was first to reach frag limit !", szName );                                 client_print( 0, print_chat, "* %s was first to reach frag limit !", szName );                                 return;             }                         client_cmd( iKiller, "spk ^"misc/%ifrag%s^"", iFrags, iFrags == 1 ? "" : "s" );                         set_hudmessage( 128, 128, 128, -1.0, 0.15, 0, 3.0, 3.0, 0.2, 0.2, 2 );             show_hudmessage( iKiller, "%i Frag%s left !", iFrags, iFrags == 1 ? "" : "s" );         }     } }

tuty 04-08-2010 09:19

Re: REQ: Frags left annouce. (3frags left, 2 frags left.. Q3 style)
 
lol look in lambda_core -.-.. xpaw version is good too

hcxx 04-08-2010 10:07

Re: REQ: Frags left annouce. (3frags left, 2 frags left.. Q3 style)
 
Yeah I know, but I dont want that stats stuff and all other what that plugin contains.

thx xPaw I will test this :)

-EDIT-

Your plugin dosent seems to work xPaw, it dont play sound and dosent show hud message.

EDIT 2

Seems you have updated your plugin beforce I posted this. now it dosent compile it says:

: error 017: undefined symbol "iKiller"

tuty 04-08-2010 12:24

Re: REQ: Frags left annouce. (3frags left, 2 frags left.. Q3 style)
 
1 Attachment(s)
i made one in my free time. Feel free to use it and share it with others.

Hope you like it.

hcxx 04-08-2010 13:20

Re: REQ: Frags left annouce. (3frags left, 2 frags left.. Q3 style)
 
thx, I will test this :P

xPaw 04-08-2010 13:35

Re: REQ: Frags left annouce. (3frags left, 2 frags left.. Q3 style)
 
Quote:

Originally Posted by hcxx (Post 1143588)
Your plugin dosent seems to work xPaw, it dont play sound and dosent show hud message.

I fixed it, tested and works.

hcxx 04-08-2010 16:22

Re: REQ: Frags left annouce. (3frags left, 2 frags left.. Q3 style)
 
thx you all, got it working now. :)

OGthc 04-14-2010 09:35

Re: REQ: Frags left annouce. (3frags left, 2 frags left.. Q3 style)
 
Nice, have been looking for this for very long time... Thanks alot
Now tested both plugs xPaw only announce to the player in lead, and tuty's is announcing to all players on the server.
Great work to both of you!


All times are GMT -4. The time now is 11:00.

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