When I test it, it does not show any hud message.
I just want to show the info of the dead player who looking for an alive player.
Here is my code, can someone fix?
Code:
#include <amxmodx>
#include <amxmisc>
#include <csx>
#include <cstrike>
#include <csstats>
#include <geoip>
#define PLUGIN_NAME "Dead Hud Message"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "WS.Chu"
new SzAddCmd[] = "amx_pausecfg add ^"%s^""
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
register_event("HLTV", "new_round", "a", "1=0", "2=0")
register_event("TextMsg", "restart_round", "a", "2=#Game_will_restart_in")
set_task(1.0, "DHM",0,"",0,"b")
return PLUGIN_CONTINUE
}
public plugin_cfg()
{
// Put here titles of plugins which you don't want to pause
server_cmd(SzAddCmd, "Dead Hud Message")
}
public DHM(id)
{
new SzHostname[64], SzTimer[32] // Get Hostname & Time
get_cvar_string("Hostname",SzHostname,63) // Get Hostname
get_time("%Y/%m/%d - %H:%M:%S", SzTimer,31) // Get Time
new SzName[128] // Get Player Name
get_user_name(id, SzName, 127) // Get Player Name
new SzAuthID[32] // Get STEAMID
get_user_authid(id, SzAuthID, 32) // Get STEAMID
new SzScores = (get_user_frags(id) - cs_get_user_deaths(id)) // Get Player Scores
new mOsef[8], SzRank // Get Player Rank
SzRank = get_user_stats(id, mOsef, mOsef) // Get Player Rank
new SzIP[16] // Get Player IP
static SzCountry[32] // Get Player Country
get_user_ip(id, SzIP, 15, 1) // Get Player IP
geoip_country(SzIP, SzCountry, 45) // Get Player Country By Using The IP
set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), 0.05, 0.60, 2, 1.0, 1.0, 0.1, 0.2, -1)
show_hudmessage(Player,"%s^nTime: %s^nPlayer Name: %s^nID: %s^n分數: %d^nRank: %i / %i^nCountry: %s", SzHostname, SzTimer, SzName, SzAuthID, SzScores, SzRank, get_statsnum(), SzCountry)
}
__________________
You can be a SUPER coder but you Haven't to say such as "stupid, etc." words to the others