Raised This Month: $ Target: $400
 0% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hcxx
Senior Member
Join Date: Jan 2007
Location: 127.0.0.1
Old 04-08-2010 , 07:51   REQ: Frags left annouce. (3frags left, 2 frags left.. Q3 style)
Reply With Quote #1

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.
Attached Files
File Type: rar fragsleft.rar (203.4 KB, 215 views)
hcxx is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 04-08-2010 , 08:27   Re: REQ: Frags left annouce. (3frags left, 2 frags left.. Q3 style)
Reply With Quote #2

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" );         }     } }
__________________

Last edited by xPaw; 04-08-2010 at 13:35.
xPaw is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 04-08-2010 , 09:19   Re: REQ: Frags left annouce. (3frags left, 2 frags left.. Q3 style)
Reply With Quote #3

lol look in lambda_core -.-.. xpaw version is good too
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
hcxx
Senior Member
Join Date: Jan 2007
Location: 127.0.0.1
Old 04-08-2010 , 10:07   Re: REQ: Frags left annouce. (3frags left, 2 frags left.. Q3 style)
Reply With Quote #4

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"

Last edited by hcxx; 04-08-2010 at 11:07.
hcxx is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 04-08-2010 , 12:24   Re: REQ: Frags left annouce. (3frags left, 2 frags left.. Q3 style)
Reply With Quote #5

i made one in my free time. Feel free to use it and share it with others.

Hope you like it.
Attached Files
File Type: sma Get Plugin or Get Source (WinnerOfTheGame.sma - 889 views - 2.8 KB)
__________________

Last edited by tuty; 04-09-2010 at 06:24.
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 04-08-2010 , 13:35   Re: REQ: Frags left annouce. (3frags left, 2 frags left.. Q3 style)
Reply With Quote #6

Quote:
Originally Posted by hcxx View Post
Your plugin dosent seems to work xPaw, it dont play sound and dosent show hud message.
I fixed it, tested and works.
__________________
xPaw is offline
hcxx
Senior Member
Join Date: Jan 2007
Location: 127.0.0.1
Old 04-08-2010 , 13:20   Re: REQ: Frags left annouce. (3frags left, 2 frags left.. Q3 style)
Reply With Quote #7

thx, I will test this
hcxx is offline
hcxx
Senior Member
Join Date: Jan 2007
Location: 127.0.0.1
Old 04-08-2010 , 16:22   Re: REQ: Frags left annouce. (3frags left, 2 frags left.. Q3 style)
Reply With Quote #8

thx you all, got it working now.
hcxx is offline
OGthc
Junior Member
Join Date: May 2009
Old 04-14-2010 , 09:35   Re: REQ: Frags left annouce. (3frags left, 2 frags left.. Q3 style)
Reply With Quote #9

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!
__________________

Last edited by OGthc; 04-14-2010 at 10:46. Reason: after testing comment
OGthc 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 11:00.


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