Raised This Month: $ Target: $400
 0% 

Freaking HUD message?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
stigma
Senior Member
Join Date: Mar 2005
Location: Denmark
Old 10-10-2006 , 08:43   Freaking HUD message?
Reply With Quote #1

I was wondering why any of my hud message aint working, i've tryed all the channels from 1-4, and even auto channeling...

Some times the hud message appears, and other times it's just overlapping. And i've tryed to enable the miscstats plugin, and the hudmessages is just working fine..

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> #define PLUGIN "Annoucement messages" #define VERSION "1.0" #define AUTHOR "stigma" new iKill[33] = 0; new ownKill[33] = 0; new hsKill[33] = 0; new bool:FirstBlood new const WickedSickSound[] = "Announce/WhickedSick.wav" new const UnStoppableSound[] = "Announce/Unstoppable.wav" new const UltraKillSound[] = "Announce/UltraKill.wav" new const TripleKillSound[] = "Announce/Triple_kill.wav" new const TeamKillerSound[] = "Announce/Team_Killer.wav" new const SpawnKillerSound[] = "Announce/Spawn_killer.wav" new const ScoreSound[] = "Announce/Score.wav" new const RedDominateSound[] = "Announce/red_team_dominating.wav" new const RampageSound[] = "Announce/Rampage.wav" new const OwnageSound[] = "Announce/Ownage.wav" new const MultiKillSound[] = "Announce/MultiKill.wav" new const MonsterKillSound[] = "Announce/monster_kill.wav" new const KillingSpreeSound[] = "Announce/Killing_Spree.wav" new const HolyShitSound[] = "Announce/HolyShit_F.wav" new const HeadShotSound[] = "Announce/HeadShot.wav" new const HeadHunterSound[] = "Announce/HeadHunter.wav" new const GodLikeSound[] = "Announce/GodLike.wav" new const FirstBloodSound[] = "Announce/first_blood.wav" new const EagleEyeSound[] = "Announce/EagleEye.wav" new const DoubleKillSound[] = "Announce/Double_Kill.wav" new const DominatingSound[] = "Announce/Dominating.wav" new const BlueDominateSound[] = "Announce/blue_team_dominating.wav" new kSound[6][] = {     "GodLikeSound",     "RampageSound",     "DominatingSound",     "WickedSickSound",     "KillingSpreeSound",     "UnstoppableSound" } public plugin_precache() {     precache_sound(DoubleKillSound) // Sound 2     precache_sound(TripleKillSound) // Sound 3     precache_sound(MultiKillSound) // Sound 5     precache_sound(KillingSpreeSound) // Sound 7     precache_sound(UltraKillSound) // Sound 9     precache_sound(MonsterKillSound) // Sound 10     precache_sound(DominatingSound) // Sound 12     precache_sound(GodLikeSound) // Sound 13     precache_sound(RampageSound) // Sound 15     precache_sound(WickedSickSound) // Sound 17     precache_sound(TeamKillerSound) // Team Mate killed     precache_sound(SpawnKillerSound) // Someone killed within 10 secs     precache_sound(ScoreSound) // Task     precache_sound(RedDominateSound) // Terroists is dominating     precache_sound(OwnageSound) // Team Owning     precache_sound(HolyShitSound) // 1 shot, 2 kill     precache_sound(HeadShotSound) // HeadShot     precache_sound(HeadHunterSound) // AWM Headshot     precache_sound(FirstBloodSound) // First Kill     precache_sound(EagleEyeSound) // Deagle Face     precache_sound(BlueDominateSound) // Counter-Terroists is dominating     precache_sound(UnStoppableSound) } public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_event("HLTV", "NewRound", "a", "1=0", "2=0")     register_event("DeathMsg","Death","a")   } public NewRound(id) {     FirstBlood = false     hsKill[id] = 0     ownKill[id] = 0 } public Death() {     set_hudmessage(0, 100, 155, 0.02, 0.60, 3, 1.0, 1.5, 0.5, 0.05, 1)         new killer = read_data(1)     new victim = read_data(2)         new vicname[33]     get_user_name(victim,vicname,32)     new killername[33]         iKill[victim] = 0     ownKill[victim] = 0     ownKill[killer] += 0.5         get_user_name(killer,killername,32)     if (get_user_team(killer) == get_user_team(victim) && killer != victim) {         client_cmd(0,"play %s", TeamKillerSound)         show_hudmessage(0, "%s killed a team mate!", killername)         iKill[killer] = 0         ownKill[killer] = 0                 return PLUGIN_HANDLED     }     if (get_user_team(killer) != get_user_team(victim)) {         if (!read_data(3)) {             hsKill[killer] = 0         }         if (read_data(3) && FirstBlood == true && hsKill[killer] != 3) {             iKill[killer] += 1             hsKill[killer] += 1             show_hudmessage(0, "Headshot!")             client_cmd(0,"play %s", HeadShotSound)             if (hsKill[killer] == 3) {                 set_task(3.0, "centerAnnounce", killer)                 return PLUGIN_HANDLED             }             return PLUGIN_HANDLED         }                 if (FirstBlood == false) {             client_cmd(0,"play %s", FirstBloodSound)             show_hudmessage(0, "%s drew First Blood!", killername)             FirstBlood = true             iKill[killer] += 1             return PLUGIN_HANDLED         }             iKill[killer] += 1         set_task(0.1, "killEvent", killer)     }     return PLUGIN_CONTINUE } public killEvent(killer) {     set_hudmessage(0, 100, 155, 0.02, 0.60, 3, 1.0, 2.0, 0.1, 0.01, 1)         new killername[33]     get_user_name(killer,killername,32)         if (iKill[killer] == 2) {         client_cmd(0,"play %s",DoubleKillSound)         show_hudmessage(killer,"Double Kill!")     } else if (iKill[killer] == 3) {         client_cmd(0,"play %s",TripleKillSound)         show_hudmessage(0,"Triple Kill!")     } else if (iKill[killer] == 5) {         client_cmd(0,"play %s",MultiKillSound)         show_hudmessage(killer,"Multi Kill!")     } else if (iKill[killer] == 7) {         client_cmd(0,"play %s",KillingSpreeSound)         show_hudmessage(0,"%s is on a Killing Spree!", killername)     } else if (iKill[killer] == 9) {         client_cmd(0,"play %s",UltraKillSound)         show_hudmessage(killer,"Ultra Kill!")     } else if (iKill[killer] == 10) {         client_cmd(0,"play %s",MonsterKillSound)         show_hudmessage(0,"M-M-M-MONSTER KILL!!!")     } else if (iKill[killer] == 11) {         client_cmd(0,"play %s",DominatingSound)         show_hudmessage(0,"%s is Dominating!", killername)     } else if (iKill[killer] == 12) {         client_cmd(0,"play %s",GodLikeSound)         show_hudmessage(0,"%s is Godlike!", killername)     } else if (iKill[killer] == 14) {         client_cmd(0,"play %s",RampageSound)         show_hudmessage(0,"%s is on a Rampage!", killername)     } else if (iKill[killer] == 15) {         client_cmd(0,"play %s",WickedSickSound)         show_hudmessage(0,"WICKED SICK!!!", killername)     } else if (iKill[killer] > 17) {         client_cmd(0,"play %s", kSound[random_num(0, 5)])     }     if (ownKill[killer] == 6) {         set_task(3.0, "centerAnnounce", killer)     }     return PLUGIN_CONTINUE } public centerAnnounce(killer) {         new killername[33]     get_user_name(killer,killername,32)         set_hudmessage(200, 100, 0, 0.45, 0.35, 1, 1.0, 2.0, 0.3, 0.3, 1)     if (ownKill[killer] == 3) {         client_cmd(0,"play %s", OwnageSound)         show_hudmessage(0,"%s is OWNING!", killername)         ownKill[killer] = 0     }     if (hsKill[killer] == 3) {         client_cmd(0,"play %s", HeadHunterSound)         show_hudmessage(0,"%s has owned %d heads in a row!",killername, hsKill[killer])         hsKill[killer] = 0     } }
stigma is offline
Send a message via MSN to stigma Send a message via Skype™ to stigma
Silencer123
Veteran Member
Join Date: Jul 2006
Old 10-10-2006 , 11:16   Re: Freaking HUD message?
Reply With Quote #2

CS has a secret: It has more than 4 Channels. Thats why it can overlap a lot and make you even lag.
Also if you use Channels 1 to 4 instead of -1, Counter-Strike always morphs that into -1.
__________________
EAT YOUR VEGGIES
Silencer123 is offline
stigma
Senior Member
Join Date: Mar 2005
Location: Denmark
Old 10-10-2006 , 12:17   Re: Freaking HUD message?
Reply With Quote #3

Okay but what do i have to do, to prevent it?
stigma is offline
Send a message via MSN to stigma Send a message via Skype™ to stigma
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-10-2006 , 12:20   Re: Freaking HUD message?
Reply With Quote #4

Code:
 set_hudmessage(200, 100, 0, 0.45, 0.35, 1, 1.0, 2.0, 0.3, 0.3, 1)

Check your fade in/out and (fx) times.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
stigma
Senior Member
Join Date: Mar 2005
Location: Denmark
Old 10-10-2006 , 12:24   Re: Freaking HUD message?
Reply With Quote #5

And what would that do? - Thought it was the channels that matters...
stigma is offline
Send a message via MSN to stigma Send a message via Skype™ to stigma
Silencer123
Veteran Member
Join Date: Jul 2006
Old 10-10-2006 , 15:34   Re: Freaking HUD message?
Reply With Quote #6

If a HUD Message is being overwritten by another HUD Message, the new Message
undertakes the remaining Data from the old Message. Example:
HUD Message: "Headshot!" Has a holdtime of 5 Seconds.
3 Seconds later...
HUD Message: "Doublekill!" Has a holdtime of 5 Seconds, but:
its holdtime will be 2 Seconds, because, as just said, it undertakes
the holdtime and some other Stuff from the previous Message.
__________________
EAT YOUR VEGGIES
Silencer123 is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-10-2006 , 20:32   Re: Freaking HUD message?
Reply With Quote #7

Quote:
Originally Posted by stigma View Post
And what would that do? - Thought it was the channels that matters...
It could be why it only appears for like a split second, unless some other plugin is taking up all four channels and displaing hud messages constantly in prethink, I don't think channels are your problem.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 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 04:52.


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