New Member
|
03-15-2024
, 18:00
Re: Half-Life: Zombie Mod X 1.1 [Last Update: 27/9/2019]
|
#25
|
Hello to all forum users.
There is a plugin (Team Score HLTDM) that shows the teams' score in HUD; it is suitable for Half Life.
Code:
#include <amxmodx>
#include <amxmisc>
#include <dhudmessage>
#include <hl>
#define VERSION "1.0"
new ScoreRed = 0
new ScoreBlue = 0
enum
{
TEAM_NONE = 0,
TEAM_BLUE,
TEAM_RED,
TEAM_SPEC
}
public plugin_init()
{
register_plugin("HL Teams Score By killing", VERSION, "Kuma")
register_message(get_user_msgid("DeathMsg"), "DeathMessage")
set_task(1.0,"score_round",_,_,_,"b")
}
public DeathMessage()
{
new iKiller = get_msg_arg_int(1)
new iAdd = 1
if(hl_get_user_team(iKiller) == TEAM_BLUE )
{
ScoreBlue += iAdd
client_print(0, print_chat, "you are blue with %d", ScoreBlue)
}
if( hl_get_user_team(iKiller) == TEAM_RED )
{
ScoreRed += iAdd
client_print(0, print_chat, "you are red with %d", ScoreRed)
}
}
public score_round()
{
set_dhudmessage(0, 70, 200, -1.0, 0.0, 0, 0.5, 1.1, 0.08, 1.1, true)
show_dhudmessage(0,"Human :%d| ", ScoreBlue);
set_dhudmessage(200, 0, 0, -1.0, 0.0, 0, 0.5, 2.0, 0.08, 2.0, true);
show_dhudmessage(0," |%d: Zombie", ScoreRed);
}
I want to install this plugin on a server with the mod "Half-Life: Zombie Mod X", but I encountered the following problem. When a person kills zombies ( Humans Win ), then the people's victory count changes to "1". And if a zombie infects a person ( Zombie Win ), then nothing happens, the zombie score remains at zero “0”. Can anyone help with this plugin so that it works correctly on this mod "Half-Life: Zombie Mod X"?
|
|