|
Member
Join Date: Apr 2014
Location: Philippines
|
05-24-2015
, 21:54
Re: Just Capture the Flag (CTF) v1.32b
|
#11
|
Quote:
Originally Posted by Hunter-Digital
That's hooked wrong, it hooks sounds instead of the team score message.
Here, I wrote a fast one, I didn't test it tough.
Spoiler
Code:
#include <amxmodx>
new g_iScore[2]
public plugin_init()
{
register_plugin("Team score HUD", "0.1", "Digi")
register_event("TeamScore", "event_teamscore", "a")
set_task(5.0, "message", _, _, _, "b")
}
public message()
{
static syncObj
if(!syncObj)
syncObj = CreateHudSyncObj()
set_hudmessage(255, 255, 255, -1.0, 0.01, 0, 0.0, 5.0, 0.1, 0.1)
ShowSyncHudMsg(0, syncObj, "RED %d | %d BLUE", g_iScore[0], g_iScore[1])
}
public event_teamscore()
{
new szTeam[2]
read_data(1, szTeam, 1)
switch(szTeam[0])
{
case 'T': g_iScore[0] = read_data(2)
case 'C': g_iScore[1] = read_data(2)
}
}
|
I tested it, it's "works" but it disappear. Is there a way to keep it permanent?
__________________
|
|
|
|