Raised This Month: $ Target: $400
 0% 

Total Frag count plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarlD
Senior Member
Join Date: Aug 2004
Old 12-16-2005 , 19:52   Total Frag count plugin
Reply With Quote #1

Okay.. i dont get any compile errors. the code prettymuch speaks for itself!

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "Total frag count" #define VERSION "01" #define AUTHOR "Meta" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_event("DeathMsg","OnDeath","bd") } public OnDeath(id)     {     new Text[32]     new Kills = get_user_frags(id)     num_to_str(Kills,Text,31)     set_hudmessage(255, 0, 0, 0.8, 0.86, 0, 6.0, 12.0)     show_hudmessage(id, "Frags:")     set_hudmessage(255, 0, 0, 0.88, 0.86, 0, 6.0, 12.0)     show_hudmessage(id, Text) }
__________________
DarlD is offline
Send a message via MSN to DarlD
SubFive
Senior Member
Join Date: Dec 2005
Location: USA
Old 12-16-2005 , 19:54  
Reply With Quote #2

I don't think
Code:
num_to_str(Kills,Text,31)
is correct.
SubFive is offline
DarlD
Senior Member
Join Date: Aug 2004
Old 12-16-2005 , 19:58  
Reply With Quote #3

Well event the simple Frags: doesnt show up on death
__________________
DarlD is offline
Send a message via MSN to DarlD
SubFive
Senior Member
Join Date: Dec 2005
Location: USA
Old 12-16-2005 , 20:00  
Reply With Quote #4

Quote:
Originally Posted by DarlD
Well event the simple Frags: doesnt show up on death
Is that a typo for even?
SubFive is offline
Des12
Senior Member
Join Date: Jan 2005
Old 12-16-2005 , 20:04  
Reply With Quote #5

Code:
 /* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "Total frag count" #define VERSION "01" #define AUTHOR "Meta" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_event("DeathMsg","OnDeath","bd") } public OnDeath(id) {     new Kills = get_user_frags(id)     set_hudmessage(255, 0, 0, 0.8, 0.86, 0, 6.0, 12.0)     show_hudmessage(id, "Frags: %i",Kills) }
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 is offline
DarlD
Senior Member
Join Date: Aug 2004
Old 12-16-2005 , 20:07  
Reply With Quote #6

thanks des but it still doesnt show up :S
__________________
DarlD is offline
Send a message via MSN to DarlD
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 12-16-2005 , 20:32  
Reply With Quote #7

Quote:
register_event( "DeathMsg", "wdeath", "a" ); when you put b there, this function won't be ever executed.
Code:
public plugin_init() {     register_event("DeathMsg","OnDeath","a") } public OnDeath() {     new id = read_data(1)     new Kills = get_user_frags(id)     set_hudmessage(255, 0, 0, 0.8, 0.86, 0, 6.0, 12.0)     show_hudmessage(id, "Frags: %i", Kills) }
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 12-16-2005 , 21:12  
Reply With Quote #8

DeathMsg is sent to all players at once, therefore it is global. This requires the a flag. The b flag is only used for messages that are sent to one player at a time.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
DarlD
Senior Member
Join Date: Aug 2004
Old 12-16-2005 , 23:17  
Reply With Quote #9

i see, very helpfull thanks
__________________
DarlD is offline
Send a message via MSN to DarlD
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 16:09.


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