Raised This Month: $ Target: $400
 0% 

Help with Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Golden Fredy
Junior Member
Join Date: Sep 2015
Old 09-30-2015 , 22:36   Help with Plugin
Reply With Quote #1

Hello, I would use this plugin with dhudmessage, thank you.

////////////////////////////////////////

#include <amxmodx>
#include <amxmisc>

#define VERSION "1.3"

new CTScore, TerrScore
new rounds_elapsed
new g_maxplayers

public plugin_init()
{
register_plugin("TeamScore on HUD", "1.0", "XXXX")
register_event("TeamScore", "ct_score", "a", "1=CT")
register_event("TeamScore", "terr_score", "a", "1=TERRORIST")
register_event("HLTV", "new_round", "a", "1=0", "2=0")
register_event("TextMsg", "restart_round", "a", "2=#Game_will_restart_in")
g_maxplayers = get_maxplayers()

show_scores()
}

public new_round()
{
rounds_elapsed += 1
}

public restart_round()
{
rounds_elapsed = 0
}

public ct_score()
{
CTScore = read_data(2)
}

public terr_score()
{
TerrScore = read_data(2)
}

public show_scores()
{
set_hudmessage( 0, 255, 0, -1.0, 0.0, _,_, 2.0,_,_, -1 )
show_hudmessage(0, "PLACAR ^nCT %i| Round %d |%i TR", CTScore, rounds_elapsed, TerrScore, g_maxplayers)

set_task(2.0, "show_scores")
}
Golden Fredy is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 10-01-2015 , 12:40   Re: Help with Plugin
Reply With Quote #2

set_hudmessage => set_dhudmessage + remove the "-1" in the end.
show_hudmessage => show_dhudmessage

If you're using an AMXX version older that 1.8.3, add this below the includes: #include <dhudmessage>.

Last edited by OciXCrom; 10-01-2015 at 12:40.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Golden Fredy
Junior Member
Join Date: Sep 2015
Old 10-01-2015 , 20:00   Re: Help with Plugin
Reply With Quote #3

[QUOTE=OciXCrom;2348666]set_hudmessage => set_dhudmessage + remove the "-1" in the end.
show_hudmessage => show_dhudmessage

I did like this and gave error in the compilation, so I changed the line for this,
set_dhudmessage( 0, 255, 0, -1.0, 0.0, 2, 6.0, 3.0, 0.1, 1.5 )
show_dhudmessage(0, "PLACAR ^nCT: %i | Round %d | %i :TR", TerrScore,rounds_elapsed,CTScore)
and stood as the image.
Attached Images
File Type: jpg de_dust2.jpg (28.6 KB, 119 views)
Golden Fredy 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 22:12.


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