Adding Escapes/Infects to HUD Information

Helping Topics
User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1864
Joined: 2 Years Ago
Location: Egypt
Has thanked: 31 times
Been thanked: 98 times
Age: 21
Contact:

Adding Escapes/Infects to HUD Information

#1

Post by Raheem » 5 Months Ago

Adding Escapes/Infects to HUD Information

Hello,

Jack made a plugin that saves the infects/escapes of any player in a MySQL database. In this simple TUT i'll show you how to use these two plugins:
  1. Escapes
  2. Infects
First you will install these plugins simply like any plugin. Next you will open ze_hud_info.sma. I added Escapes and infects, here the edited plugin: Please note that in zombie_escape.txt i added keys for English language only.
If you have any problem don't hesitate to post down.
You don't know? Learn and you will know.

HalDan
Member
Member
United States of America
Posts: 1
Joined: 2 Months Ago
Has thanked: 0
Been thanked: 0
Contact:

#2

Post by HalDan » 2 Months Ago

Can you import/export the Escapes and Infects info?

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1864
Joined: 2 Years Ago
Location: Egypt
Has thanked: 31 times
Been thanked: 98 times
Age: 21
Contact:

#3

Post by Raheem » 2 Months Ago

I don't understand what you need, explain more.
You don't know? Learn and you will know.

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 477
Joined: 2 Years Ago
Has thanked: 18 times
Been thanked: 1 time
Contact:

#4

Post by czirimbolo » 1 Month Ago

I use only infects and have error

Code: Select all

#include <zombie_escape>

// Define some natives
native ze_get_user_infects(id)

// Defines
#define TASK_SHOWHUD 100
#define ID_SHOWHUD (taskid - TASK_SHOWHUD)

// Constants Change X,Y If you need (HUD & DHud)
const Float:HUD_SPECT_X = 0.01
const Float:HUD_SPECT_Y = 0.130
const Float:HUD_STATS_X = -1.0
const Float:HUD_STATS_Y = 0.86

// Colors
enum
{
	Red = 0,
	Green,
	Blue
}

// Variables
new g_iMsgSync, 
	g_pCvarRankEnabled
	
// Cvars
new g_pCvarHudInfoMode, 
	g_pCvarHudInfoComma,
	g_pCvarZombieInfoColors[3],
	g_pCvarHumanInfoColors[3],
	g_pCvarSpecInfoColors[3]

public plugin_init()
{
	register_plugin("[ZE] Hud Information", ZE_VERSION, AUTHORS)
	
	// Messages
	g_iMsgSync = CreateHudSyncObj()
	
	//Cvars
	g_pCvarHudInfoMode = register_cvar("ze_hud_info_mode", "1")
	g_pCvarHudInfoComma = register_cvar("ze_hud_info_commas", "1")
	g_pCvarZombieInfoColors[Red] = register_cvar("ze_hud_info_zombie_red", "255")
	g_pCvarZombieInfoColors[Green] = register_cvar("ze_hud_info_zombie_green", "20")
	g_pCvarZombieInfoColors[Blue] = register_cvar("ze_hud_info_zombie_blue", "20")
	g_pCvarHumanInfoColors[Red] = register_cvar("ze_hud_info_human_red", "20")
	g_pCvarHumanInfoColors[Green] = register_cvar("ze_hud_info_human_green", "20")
	g_pCvarHumanInfoColors[Blue] = register_cvar("ze_hud_info_human_blue", "255")
	g_pCvarSpecInfoColors[Red] = register_cvar("ze_hud_info_spec_red", "100")
	g_pCvarSpecInfoColors[Green] = register_cvar("ze_hud_info_spec_green", "100")
	g_pCvarSpecInfoColors[Blue] = register_cvar("ze_hud_info_spec_blue", "100")
	
	// Pointer
	g_pCvarRankEnabled = get_cvar_pointer("ze_speed_rank_mode")
}

public client_putinserver(id)
{
	if(!is_user_bot(id))
	{
		set_task(1.0, "ShowHUD", id+TASK_SHOWHUD, _, _, "b")
	}
}

public client_disconnected(id)
{
	remove_task(id+TASK_SHOWHUD)
}

public ShowHUD(taskid)
{
	if (get_pcvar_num(g_pCvarHudInfoMode) == 0)
		return
	
	new iPlayer = ID_SHOWHUD
	
	if (!is_user_alive(iPlayer))
	{
		iPlayer = get_entvar(iPlayer, var_iuser2)
		
		if (!is_user_alive(iPlayer))
			return
	}
	
	if(iPlayer != ID_SHOWHUD)
	{
		new szName[32]
		get_user_name(iPlayer, szName, charsmax(szName))

		if (get_pcvar_num(g_pCvarHudInfoMode) == 1)
		{
			set_hudmessage(get_pcvar_num(g_pCvarSpecInfoColors[Red]), get_pcvar_num(g_pCvarSpecInfoColors[Green]), get_pcvar_num(g_pCvarSpecInfoColors[Blue]), HUD_SPECT_X, HUD_SPECT_Y, 0, 1.2, 1.1, 0.5, 0.6, -1)
			
			if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
			{
				new szHealth[15]
				AddCommas(get_user_health(iPlayer), szHealth, charsmax(szHealth))
				
				if (ze_is_user_zombie(iPlayer))
				{
					ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "ZOMBIE_SPEC_COMMAS", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
				else if ((iPlayer == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
				{
					ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_SPEC_COMMAS_LEADER", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
				else
				{
					ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_SPEC_COMMAS", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
			}
			else
			{
				if (ze_is_user_zombie(iPlayer))
				{
					ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "ZOMBIE_SPEC", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
				else if ((iPlayer == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
				{
					ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_SPEC_LEADER", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
				else
				{
					ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_SPEC", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
			}
		}
		else if (get_pcvar_num(g_pCvarHudInfoMode) == 2)
		{
			set_dhudmessage(get_pcvar_num(g_pCvarSpecInfoColors[Red]), get_pcvar_num(g_pCvarSpecInfoColors[Green]), get_pcvar_num(g_pCvarSpecInfoColors[Blue]), HUD_SPECT_X, HUD_SPECT_Y, 0, 1.2, 1.1, 0.5, 0.6)
			
			if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
			{
				new szHealth[15]
				AddCommas(get_user_health(iPlayer), szHealth, charsmax(szHealth))
				
				if (ze_is_user_zombie(iPlayer))
				{
					show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "ZOMBIE_SPEC_COMMAS", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
				else if ((iPlayer == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
				{
					show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_SPEC_COMMAS_LEADER", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
				else
				{
					show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_SPEC_COMMAS", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
			}
			else
			{
				if (ze_is_user_zombie(iPlayer))
				{
					show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "ZOMBIE_SPEC", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
				else if ((iPlayer == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
				{
					show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_SPEC_LEADER", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
				else
				{
					show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_SPEC", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
			}
		}
	}
	else if (ze_is_user_zombie(iPlayer))
	{
		if (get_pcvar_num(g_pCvarHudInfoMode) == 1)
		{
			set_hudmessage(get_pcvar_num(g_pCvarZombieInfoColors[Red]), get_pcvar_num(g_pCvarZombieInfoColors[Green]), get_pcvar_num(g_pCvarZombieInfoColors[Blue]), HUD_STATS_X, HUD_STATS_Y, 0, 1.2, 1.1, 0.5, 0.6, -1)
			
			if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
			{
				new szHealth[15]
				AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))

				ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "ZOMBIE_COMMAS", szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
			}
			else
			{
				ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "ZOMBIE", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
			}
		}
		else if (get_pcvar_num(g_pCvarHudInfoMode) == 2)
		{
			set_dhudmessage(get_pcvar_num(g_pCvarZombieInfoColors[Red]), get_pcvar_num(g_pCvarZombieInfoColors[Green]), get_pcvar_num(g_pCvarZombieInfoColors[Blue]), HUD_STATS_X, HUD_STATS_Y, 0, 1.2, 1.1, 0.5, 0.6)
			
			if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
			{
				new szHealth[15]
				AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
				
				show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "ZOMBIE_COMMAS", szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
			}
			else
			{
				show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "ZOMBIE", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))	
			}
		}
	}
	else
	{
		if (get_pcvar_num(g_pCvarHudInfoMode) == 1)
		{
			set_hudmessage(get_pcvar_num(g_pCvarHumanInfoColors[Red]), get_pcvar_num(g_pCvarHumanInfoColors[Green]), get_pcvar_num(g_pCvarHumanInfoColors[Blue]), HUD_STATS_X, HUD_STATS_Y, 0, 1.2, 1.1, 0.5, 0.6, -1)
			
			if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
			{
				if ((ID_SHOWHUD == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
				{
					new szHealth[15]
					AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
				
					ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_LEADER_COMMAS", szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
				}
				else
				{
					new szHealth[15]
					AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
				
					ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_COMMAS", szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
				}					
			}
			else
			{
				if ((ID_SHOWHUD == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
				{
					ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_LEADER", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
				}
				else
				{
					ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
				}					
			}
		}
		else if (get_pcvar_num(g_pCvarHudInfoMode) == 2)
		{
			set_dhudmessage(get_pcvar_num(g_pCvarHumanInfoColors[Red]), get_pcvar_num(g_pCvarHumanInfoColors[Green]), get_pcvar_num(g_pCvarHumanInfoColors[Blue]), HUD_STATS_X, HUD_STATS_Y, 0, 1.2, 1.1, 0.5, 0.6)
			
			if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
			{
				if ((ID_SHOWHUD == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
				{
					new szHealth[15]
					AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
				
					show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_LEADER_COMMAS", szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
				}
				else
				{
					new szHealth[15]
					AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
				
					show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_COMMAS", szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
				}
			}
			else
			{
				if ((ID_SHOWHUD == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
				{
					show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_LEADER", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
				}
				else
				{
					show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
				}
			}
		}
	}
}

L 06/14/2019 - 18:02:57: [AMXX] [0] ze_hud_info.sma::ShowHUD (line 180)
L 06/14/2019 - 18:02:58: String formatted incorrectly - parameter 9 (total 8)
L 06/14/2019 - 18:02:58: [AMXX] Displaying debug trace (plugin "ze_hud_info.amxx", version "1.4")
L 06/14/2019 - 18:02:58: [AMXX] Run time error 25: parameter error

L 06/14/2019 - 18:04:35: String formatted incorrectly - parameter 9 (total 8)
L 06/14/2019 - 18:04:35: [AMXX] Displaying debug trace (plugin "ze_hud_info.amxx", version "1.4")
L 06/14/2019 - 18:04:35: [AMXX] Run time error 25: parameter error
L 06/14/2019 - 18:04:35: [AMXX] [0] ze_hud_info.sma::ShowHUD (line 224)


Raheem can you help?
Image

User avatar
Mark
Senior Member
Senior Member
United States of America
Posts: 281
Joined: 10 Months Ago
Location: Des Moines/USA
Has thanked: 6 times
Been thanked: 21 times
Age: 33
Contact:

#5

Post by Mark » 4 Weeks Ago

czirimbolo wrote:
1 Month Ago
I use only infects and have error

Code: Select all

#include <zombie_escape>

// Define some natives
native ze_get_user_infects(id)

// Defines
#define TASK_SHOWHUD 100
#define ID_SHOWHUD (taskid - TASK_SHOWHUD)

// Constants Change X,Y If you need (HUD & DHud)
const Float:HUD_SPECT_X = 0.01
const Float:HUD_SPECT_Y = 0.130
const Float:HUD_STATS_X = -1.0
const Float:HUD_STATS_Y = 0.86

// Colors
enum
{
	Red = 0,
	Green,
	Blue
}

// Variables
new g_iMsgSync, 
	g_pCvarRankEnabled
	
// Cvars
new g_pCvarHudInfoMode, 
	g_pCvarHudInfoComma,
	g_pCvarZombieInfoColors[3],
	g_pCvarHumanInfoColors[3],
	g_pCvarSpecInfoColors[3]

public plugin_init()
{
	register_plugin("[ZE] Hud Information", ZE_VERSION, AUTHORS)
	
	// Messages
	g_iMsgSync = CreateHudSyncObj()
	
	//Cvars
	g_pCvarHudInfoMode = register_cvar("ze_hud_info_mode", "1")
	g_pCvarHudInfoComma = register_cvar("ze_hud_info_commas", "1")
	g_pCvarZombieInfoColors[Red] = register_cvar("ze_hud_info_zombie_red", "255")
	g_pCvarZombieInfoColors[Green] = register_cvar("ze_hud_info_zombie_green", "20")
	g_pCvarZombieInfoColors[Blue] = register_cvar("ze_hud_info_zombie_blue", "20")
	g_pCvarHumanInfoColors[Red] = register_cvar("ze_hud_info_human_red", "20")
	g_pCvarHumanInfoColors[Green] = register_cvar("ze_hud_info_human_green", "20")
	g_pCvarHumanInfoColors[Blue] = register_cvar("ze_hud_info_human_blue", "255")
	g_pCvarSpecInfoColors[Red] = register_cvar("ze_hud_info_spec_red", "100")
	g_pCvarSpecInfoColors[Green] = register_cvar("ze_hud_info_spec_green", "100")
	g_pCvarSpecInfoColors[Blue] = register_cvar("ze_hud_info_spec_blue", "100")
	
	// Pointer
	g_pCvarRankEnabled = get_cvar_pointer("ze_speed_rank_mode")
}

public client_putinserver(id)
{
	if(!is_user_bot(id))
	{
		set_task(1.0, "ShowHUD", id+TASK_SHOWHUD, _, _, "b")
	}
}

public client_disconnected(id)
{
	remove_task(id+TASK_SHOWHUD)
}

public ShowHUD(taskid)
{
	if (get_pcvar_num(g_pCvarHudInfoMode) == 0)
		return
	
	new iPlayer = ID_SHOWHUD
	
	if (!is_user_alive(iPlayer))
	{
		iPlayer = get_entvar(iPlayer, var_iuser2)
		
		if (!is_user_alive(iPlayer))
			return
	}
	
	if(iPlayer != ID_SHOWHUD)
	{
		new szName[32]
		get_user_name(iPlayer, szName, charsmax(szName))

		if (get_pcvar_num(g_pCvarHudInfoMode) == 1)
		{
			set_hudmessage(get_pcvar_num(g_pCvarSpecInfoColors[Red]), get_pcvar_num(g_pCvarSpecInfoColors[Green]), get_pcvar_num(g_pCvarSpecInfoColors[Blue]), HUD_SPECT_X, HUD_SPECT_Y, 0, 1.2, 1.1, 0.5, 0.6, -1)
			
			if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
			{
				new szHealth[15]
				AddCommas(get_user_health(iPlayer), szHealth, charsmax(szHealth))
				
				if (ze_is_user_zombie(iPlayer))
				{
					ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "ZOMBIE_SPEC_COMMAS", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
				else if ((iPlayer == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
				{
					ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_SPEC_COMMAS_LEADER", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
				else
				{
					ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_SPEC_COMMAS", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
			}
			else
			{
				if (ze_is_user_zombie(iPlayer))
				{
					ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "ZOMBIE_SPEC", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
				else if ((iPlayer == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
				{
					ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_SPEC_LEADER", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
				else
				{
					ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_SPEC", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
			}
		}
		else if (get_pcvar_num(g_pCvarHudInfoMode) == 2)
		{
			set_dhudmessage(get_pcvar_num(g_pCvarSpecInfoColors[Red]), get_pcvar_num(g_pCvarSpecInfoColors[Green]), get_pcvar_num(g_pCvarSpecInfoColors[Blue]), HUD_SPECT_X, HUD_SPECT_Y, 0, 1.2, 1.1, 0.5, 0.6)
			
			if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
			{
				new szHealth[15]
				AddCommas(get_user_health(iPlayer), szHealth, charsmax(szHealth))
				
				if (ze_is_user_zombie(iPlayer))
				{
					show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "ZOMBIE_SPEC_COMMAS", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
				else if ((iPlayer == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
				{
					show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_SPEC_COMMAS_LEADER", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
				else
				{
					show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_SPEC_COMMAS", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
			}
			else
			{
				if (ze_is_user_zombie(iPlayer))
				{
					show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "ZOMBIE_SPEC", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
				else if ((iPlayer == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
				{
					show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_SPEC_LEADER", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
				else
				{
					show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_SPEC", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
				}
			}
		}
	}
	else if (ze_is_user_zombie(iPlayer))
	{
		if (get_pcvar_num(g_pCvarHudInfoMode) == 1)
		{
			set_hudmessage(get_pcvar_num(g_pCvarZombieInfoColors[Red]), get_pcvar_num(g_pCvarZombieInfoColors[Green]), get_pcvar_num(g_pCvarZombieInfoColors[Blue]), HUD_STATS_X, HUD_STATS_Y, 0, 1.2, 1.1, 0.5, 0.6, -1)
			
			if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
			{
				new szHealth[15]
				AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))

				ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "ZOMBIE_COMMAS", szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
			}
			else
			{
				ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "ZOMBIE", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
			}
		}
		else if (get_pcvar_num(g_pCvarHudInfoMode) == 2)
		{
			set_dhudmessage(get_pcvar_num(g_pCvarZombieInfoColors[Red]), get_pcvar_num(g_pCvarZombieInfoColors[Green]), get_pcvar_num(g_pCvarZombieInfoColors[Blue]), HUD_STATS_X, HUD_STATS_Y, 0, 1.2, 1.1, 0.5, 0.6)
			
			if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
			{
				new szHealth[15]
				AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
				
				show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "ZOMBIE_COMMAS", szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
			}
			else
			{
				show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "ZOMBIE", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))	
			}
		}
	}
	else
	{
		if (get_pcvar_num(g_pCvarHudInfoMode) == 1)
		{
			set_hudmessage(get_pcvar_num(g_pCvarHumanInfoColors[Red]), get_pcvar_num(g_pCvarHumanInfoColors[Green]), get_pcvar_num(g_pCvarHumanInfoColors[Blue]), HUD_STATS_X, HUD_STATS_Y, 0, 1.2, 1.1, 0.5, 0.6, -1)
			
			if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
			{
				if ((ID_SHOWHUD == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
				{
					new szHealth[15]
					AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
				
					ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_LEADER_COMMAS", szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
				}
				else
				{
					new szHealth[15]
					AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
				
					ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_COMMAS", szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
				}					
			}
			else
			{
				if ((ID_SHOWHUD == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
				{
					ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_LEADER", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
				}
				else
				{
					ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
				}					
			}
		}
		else if (get_pcvar_num(g_pCvarHudInfoMode) == 2)
		{
			set_dhudmessage(get_pcvar_num(g_pCvarHumanInfoColors[Red]), get_pcvar_num(g_pCvarHumanInfoColors[Green]), get_pcvar_num(g_pCvarHumanInfoColors[Blue]), HUD_STATS_X, HUD_STATS_Y, 0, 1.2, 1.1, 0.5, 0.6)
			
			if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
			{
				if ((ID_SHOWHUD == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
				{
					new szHealth[15]
					AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
				
					show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_LEADER_COMMAS", szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
				}
				else
				{
					new szHealth[15]
					AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
				
					show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_COMMAS", szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
				}
			}
			else
			{
				if ((ID_SHOWHUD == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
				{
					show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_LEADER", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
				}
				else
				{
					show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
				}
			}
		}
	}
}

L 06/14/2019 - 18:02:57: [AMXX] [0] ze_hud_info.sma::ShowHUD (line 180)
L 06/14/2019 - 18:02:58: String formatted incorrectly - parameter 9 (total 8)
L 06/14/2019 - 18:02:58: [AMXX] Displaying debug trace (plugin "ze_hud_info.amxx", version "1.4")
L 06/14/2019 - 18:02:58: [AMXX] Run time error 25: parameter error

L 06/14/2019 - 18:04:35: String formatted incorrectly - parameter 9 (total 8)
L 06/14/2019 - 18:04:35: [AMXX] Displaying debug trace (plugin "ze_hud_info.amxx", version "1.4")
L 06/14/2019 - 18:04:35: [AMXX] Run time error 25: parameter error
L 06/14/2019 - 18:04:35: [AMXX] [0] ze_hud_info.sma::ShowHUD (line 224)


Raheem can you help?
You dont have enough parameter on line 180...



  1. #include <zombie_escape>
  2.  
  3. // Define some natives
  4. native ze_get_user_infects(id)
  5.  
  6. // Defines
  7. #define TASK_SHOWHUD 100
  8. #define ID_SHOWHUD (taskid - TASK_SHOWHUD)
  9.  
  10. // Constants Change X,Y If you need (HUD & DHud)
  11. const Float:HUD_SPECT_X = 0.01
  12. const Float:HUD_SPECT_Y = 0.130
  13. const Float:HUD_STATS_X = -1.0
  14. const Float:HUD_STATS_Y = 0.86
  15.  
  16. // Colors
  17. enum
  18. {
  19.     Red = 0,
  20.     Green,
  21.     Blue
  22. }
  23.  
  24. // Variables
  25. new g_iMsgSync,
  26.     g_pCvarRankEnabled
  27.    
  28. // Cvars
  29. new g_pCvarHudInfoMode,
  30.     g_pCvarHudInfoComma,
  31.     g_pCvarZombieInfoColors[3],
  32.     g_pCvarHumanInfoColors[3],
  33.     g_pCvarSpecInfoColors[3]
  34.  
  35. public plugin_init()
  36. {
  37.     register_plugin("[ZE] Hud Information", ZE_VERSION, AUTHORS)
  38.    
  39.     // Messages
  40.     g_iMsgSync = CreateHudSyncObj()
  41.    
  42.     //Cvars
  43.     g_pCvarHudInfoMode = register_cvar("ze_hud_info_mode", "1")
  44.     g_pCvarHudInfoComma = register_cvar("ze_hud_info_commas", "1")
  45.     g_pCvarZombieInfoColors[Red] = register_cvar("ze_hud_info_zombie_red", "255")
  46.     g_pCvarZombieInfoColors[Green] = register_cvar("ze_hud_info_zombie_green", "20")
  47.     g_pCvarZombieInfoColors[Blue] = register_cvar("ze_hud_info_zombie_blue", "20")
  48.     g_pCvarHumanInfoColors[Red] = register_cvar("ze_hud_info_human_red", "20")
  49.     g_pCvarHumanInfoColors[Green] = register_cvar("ze_hud_info_human_green", "20")
  50.     g_pCvarHumanInfoColors[Blue] = register_cvar("ze_hud_info_human_blue", "255")
  51.     g_pCvarSpecInfoColors[Red] = register_cvar("ze_hud_info_spec_red", "100")
  52.     g_pCvarSpecInfoColors[Green] = register_cvar("ze_hud_info_spec_green", "100")
  53.     g_pCvarSpecInfoColors[Blue] = register_cvar("ze_hud_info_spec_blue", "100")
  54.    
  55.     // Pointer
  56.     g_pCvarRankEnabled = get_cvar_pointer("ze_speed_rank_mode")
  57. }
  58.  
  59. public client_putinserver(id)
  60. {
  61.     if(!is_user_bot(id))
  62.     {
  63.         set_task(1.0, "ShowHUD", id+TASK_SHOWHUD, _, _, "b")
  64.     }
  65. }
  66.  
  67. public client_disconnected(id)
  68. {
  69.     remove_task(id+TASK_SHOWHUD)
  70. }
  71.  
  72. public ShowHUD(taskid)
  73. {
  74.     if (get_pcvar_num(g_pCvarHudInfoMode) == 0)
  75.         return
  76.    
  77.     new iPlayer = ID_SHOWHUD
  78.    
  79.     if (!is_user_alive(iPlayer))
  80.     {
  81.         iPlayer = get_entvar(iPlayer, var_iuser2)
  82.        
  83.         if (!is_user_alive(iPlayer))
  84.             return
  85.     }
  86.    
  87.     if(iPlayer != ID_SHOWHUD)
  88.     {
  89.         new szName[32]
  90.         get_user_name(iPlayer, szName, charsmax(szName))
  91.  
  92.         if (get_pcvar_num(g_pCvarHudInfoMode) == 1)
  93.         {
  94.             set_hudmessage(get_pcvar_num(g_pCvarSpecInfoColors[Red]), get_pcvar_num(g_pCvarSpecInfoColors[Green]), get_pcvar_num(g_pCvarSpecInfoColors[Blue]), HUD_SPECT_X, HUD_SPECT_Y, 0, 1.2, 1.1, 0.5, 0.6, -1)
  95.            
  96.             if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
  97.             {
  98.                 new szHealth[15]
  99.                 AddCommas(get_user_health(iPlayer), szHealth, charsmax(szHealth))
  100.                
  101.                 if (ze_is_user_zombie(iPlayer))
  102.                 {
  103.                     ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "ZOMBIE_SPEC_COMMAS", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  104.                 }
  105.                 else if ((iPlayer == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
  106.                 {
  107.                     ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_SPEC_COMMAS_LEADER", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  108.                 }
  109.                 else
  110.                 {
  111.                     ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_SPEC_COMMAS", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  112.                 }
  113.             }
  114.             else
  115.             {
  116.                 if (ze_is_user_zombie(iPlayer))
  117.                 {
  118.                     ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "ZOMBIE_SPEC", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  119.                 }
  120.                 else if ((iPlayer == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
  121.                 {
  122.                     ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_SPEC_LEADER", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  123.                 }
  124.                 else
  125.                 {
  126.                     ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_SPEC", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  127.                 }
  128.             }
  129.         }
  130.         else if (get_pcvar_num(g_pCvarHudInfoMode) == 2)
  131.         {
  132.             set_dhudmessage(get_pcvar_num(g_pCvarSpecInfoColors[Red]), get_pcvar_num(g_pCvarSpecInfoColors[Green]), get_pcvar_num(g_pCvarSpecInfoColors[Blue]), HUD_SPECT_X, HUD_SPECT_Y, 0, 1.2, 1.1, 0.5, 0.6)
  133.            
  134.             if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
  135.             {
  136.                 new szHealth[15]
  137.                 AddCommas(get_user_health(iPlayer), szHealth, charsmax(szHealth))
  138.                
  139.                 if (ze_is_user_zombie(iPlayer))
  140.                 {
  141.                     show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "ZOMBIE_SPEC_COMMAS", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  142.                 }
  143.                 else if ((iPlayer == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
  144.                 {
  145.                     show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_SPEC_COMMAS_LEADER", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  146.                 }
  147.                 else
  148.                 {
  149.                     show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_SPEC_COMMAS", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  150.                 }
  151.             }
  152.             else
  153.             {
  154.                 if (ze_is_user_zombie(iPlayer))
  155.                 {
  156.                     show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "ZOMBIE_SPEC", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  157.                 }
  158.                 else if ((iPlayer == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
  159.                 {
  160.                     show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_SPEC_LEADER", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  161.                 }
  162.                 else
  163.                 {
  164.                     show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_SPEC", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  165.                 }
  166.             }
  167.         }
  168.     }
  169.     else if (ze_is_user_zombie(iPlayer))
  170.     {
  171.         if (get_pcvar_num(g_pCvarHudInfoMode) == 1)
  172.         {
  173.             set_hudmessage(get_pcvar_num(g_pCvarZombieInfoColors[Red]), get_pcvar_num(g_pCvarZombieInfoColors[Green]), get_pcvar_num(g_pCvarZombieInfoColors[Blue]), HUD_STATS_X, HUD_STATS_Y, 0, 1.2, 1.1, 0.5, 0.6, -1)
  174.            
  175.             if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
  176.             {
  177.                 new szHealth[15]
  178.                 AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
  179.  
  180.                 ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "ZOMBIE_COMMAS", szName, szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  181.             }
  182.             else
  183.             {
  184.                 ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "ZOMBIE", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  185.             }
  186.         }
  187.         else if (get_pcvar_num(g_pCvarHudInfoMode) == 2)
  188.         {
  189.             set_dhudmessage(get_pcvar_num(g_pCvarZombieInfoColors[Red]), get_pcvar_num(g_pCvarZombieInfoColors[Green]), get_pcvar_num(g_pCvarZombieInfoColors[Blue]), HUD_STATS_X, HUD_STATS_Y, 0, 1.2, 1.1, 0.5, 0.6)
  190.            
  191.             if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
  192.             {
  193.                 new szHealth[15]
  194.                 AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
  195.                
  196.                 show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "ZOMBIE_COMMAS", szName, szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  197.             }
  198.             else
  199.             {
  200.                 show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "ZOMBIE", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))   
  201.             }
  202.         }
  203.     }
  204.     else
  205.     {
  206.         if (get_pcvar_num(g_pCvarHudInfoMode) == 1)
  207.         {
  208.             set_hudmessage(get_pcvar_num(g_pCvarHumanInfoColors[Red]), get_pcvar_num(g_pCvarHumanInfoColors[Green]), get_pcvar_num(g_pCvarHumanInfoColors[Blue]), HUD_STATS_X, HUD_STATS_Y, 0, 1.2, 1.1, 0.5, 0.6, -1)
  209.            
  210.             if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
  211.             {
  212.                 if ((ID_SHOWHUD == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
  213.                 {
  214.                     new szHealth[15]
  215.                     AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
  216.                
  217.                     ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_LEADER_COMMAS", szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  218.                 }
  219.                 else
  220.                 {
  221.                     new szHealth[15]
  222.                     AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
  223.                
  224.                     ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_COMMAS", szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  225.                 }                  
  226.             }
  227.             else
  228.             {
  229.                 if ((ID_SHOWHUD == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
  230.                 {
  231.                     ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_LEADER", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  232.                 }
  233.                 else
  234.                 {
  235.                     ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  236.                 }                  
  237.             }
  238.         }
  239.         else if (get_pcvar_num(g_pCvarHudInfoMode) == 2)
  240.         {
  241.             set_dhudmessage(get_pcvar_num(g_pCvarHumanInfoColors[Red]), get_pcvar_num(g_pCvarHumanInfoColors[Green]), get_pcvar_num(g_pCvarHumanInfoColors[Blue]), HUD_STATS_X, HUD_STATS_Y, 0, 1.2, 1.1, 0.5, 0.6)
  242.            
  243.             if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
  244.             {
  245.                 if ((ID_SHOWHUD == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
  246.                 {
  247.                     new szHealth[15]
  248.                     AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
  249.                
  250.                     show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_LEADER_COMMAS", szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  251.                 }
  252.                 else
  253.                 {
  254.                     new szHealth[15]
  255.                     AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
  256.                
  257.                     show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_COMMAS", szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  258.                 }
  259.             }
  260.             else
  261.             {
  262.                 if ((ID_SHOWHUD == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
  263.                 {
  264.                     show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_LEADER", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  265.                 }
  266.                 else
  267.                 {
  268.                     show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  269.                 }
  270.             }
  271.         }
  272.     }
  273. }

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 477
Joined: 2 Years Ago
Has thanked: 18 times
Been thanked: 1 time
Contact:

#6

Post by czirimbolo » 4 Weeks Ago

//// ze_hud_info.sma
//
// C:\Users\macie\Documents\Compiler v1.8.3\scripting\ze_hud_info.sma(180) : error 017: undefined symbol "szName"
// C:\Users\macie\Documents\Compiler v1.8.3\scripting\ze_hud_info.sma(196) : error 017: undefined symbol "szName"
//
// 2 Errors.
// Could not locate output file compiled\ze_hud_info.amx (compile failed).
//
// Compilation Time: 1,09 sec
Image

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 477
Joined: 2 Years Ago
Has thanked: 18 times
Been thanked: 1 time
Contact:

#7

Post by czirimbolo » 3 Weeks Ago

can someone help here ?
Image

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1864
Joined: 2 Years Ago
Location: Egypt
Has thanked: 31 times
Been thanked: 98 times
Age: 21
Contact:

#8

Post by Raheem » 3 Weeks Ago

  1. #include <zombie_escape>
  2.  
  3. // Define some natives
  4. native ze_get_user_infects(id)
  5.  
  6. // Defines
  7. #define TASK_SHOWHUD 100
  8. #define ID_SHOWHUD (taskid - TASK_SHOWHUD)
  9.  
  10. // Constants Change X,Y If you need (HUD & DHud)
  11. const Float:HUD_SPECT_X = 0.01
  12. const Float:HUD_SPECT_Y = 0.130
  13. const Float:HUD_STATS_X = -1.0
  14. const Float:HUD_STATS_Y = 0.86
  15.  
  16. // Colors
  17. enum
  18. {
  19.     Red = 0,
  20.     Green,
  21.     Blue
  22. }
  23.  
  24. // Variables
  25. new g_iMsgSync,
  26.     g_pCvarRankEnabled
  27.    
  28. // Cvars
  29. new g_pCvarHudInfoMode,
  30.     g_pCvarHudInfoComma,
  31.     g_pCvarZombieInfoColors[3],
  32.     g_pCvarHumanInfoColors[3],
  33.     g_pCvarSpecInfoColors[3]
  34.  
  35. public plugin_init()
  36. {
  37.     register_plugin("[ZE] Hud Information", ZE_VERSION, AUTHORS)
  38.    
  39.     // Messages
  40.     g_iMsgSync = CreateHudSyncObj()
  41.    
  42.     //Cvars
  43.     g_pCvarHudInfoMode = register_cvar("ze_hud_info_mode", "1")
  44.     g_pCvarHudInfoComma = register_cvar("ze_hud_info_commas", "1")
  45.     g_pCvarZombieInfoColors[Red] = register_cvar("ze_hud_info_zombie_red", "255")
  46.     g_pCvarZombieInfoColors[Green] = register_cvar("ze_hud_info_zombie_green", "20")
  47.     g_pCvarZombieInfoColors[Blue] = register_cvar("ze_hud_info_zombie_blue", "20")
  48.     g_pCvarHumanInfoColors[Red] = register_cvar("ze_hud_info_human_red", "20")
  49.     g_pCvarHumanInfoColors[Green] = register_cvar("ze_hud_info_human_green", "20")
  50.     g_pCvarHumanInfoColors[Blue] = register_cvar("ze_hud_info_human_blue", "255")
  51.     g_pCvarSpecInfoColors[Red] = register_cvar("ze_hud_info_spec_red", "100")
  52.     g_pCvarSpecInfoColors[Green] = register_cvar("ze_hud_info_spec_green", "100")
  53.     g_pCvarSpecInfoColors[Blue] = register_cvar("ze_hud_info_spec_blue", "100")
  54.    
  55.     // Pointer
  56.     g_pCvarRankEnabled = get_cvar_pointer("ze_speed_rank_mode")
  57. }
  58.  
  59. public client_putinserver(id)
  60. {
  61.     if(!is_user_bot(id))
  62.     {
  63.         set_task(1.0, "ShowHUD", id+TASK_SHOWHUD, _, _, "b")
  64.     }
  65. }
  66.  
  67. public client_disconnected(id)
  68. {
  69.     remove_task(id+TASK_SHOWHUD)
  70. }
  71.  
  72. public ShowHUD(taskid)
  73. {
  74.     if (get_pcvar_num(g_pCvarHudInfoMode) == 0)
  75.         return
  76.    
  77.     new iPlayer = ID_SHOWHUD
  78.    
  79.     if (!is_user_alive(iPlayer))
  80.     {
  81.         iPlayer = get_entvar(iPlayer, var_iuser2)
  82.        
  83.         if (!is_user_alive(iPlayer))
  84.             return
  85.     }
  86.    
  87.     if(iPlayer != ID_SHOWHUD)
  88.     {
  89.         new szName[32]
  90.         get_user_name(iPlayer, szName, charsmax(szName))
  91.  
  92.         if (get_pcvar_num(g_pCvarHudInfoMode) == 1)
  93.         {
  94.             set_hudmessage(get_pcvar_num(g_pCvarSpecInfoColors[Red]), get_pcvar_num(g_pCvarSpecInfoColors[Green]), get_pcvar_num(g_pCvarSpecInfoColors[Blue]), HUD_SPECT_X, HUD_SPECT_Y, 0, 1.2, 1.1, 0.5, 0.6, -1)
  95.            
  96.             if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
  97.             {
  98.                 new szHealth[15]
  99.                 AddCommas(get_user_health(iPlayer), szHealth, charsmax(szHealth))
  100.                
  101.                 if (ze_is_user_zombie(iPlayer))
  102.                 {
  103.                     ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "ZOMBIE_SPEC_COMMAS", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  104.                 }
  105.                 else if ((iPlayer == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
  106.                 {
  107.                     ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_SPEC_COMMAS_LEADER", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  108.                 }
  109.                 else
  110.                 {
  111.                     ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_SPEC_COMMAS", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  112.                 }
  113.             }
  114.             else
  115.             {
  116.                 if (ze_is_user_zombie(iPlayer))
  117.                 {
  118.                     ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "ZOMBIE_SPEC", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  119.                 }
  120.                 else if ((iPlayer == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
  121.                 {
  122.                     ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_SPEC_LEADER", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  123.                 }
  124.                 else
  125.                 {
  126.                     ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_SPEC", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  127.                 }
  128.             }
  129.         }
  130.         else if (get_pcvar_num(g_pCvarHudInfoMode) == 2)
  131.         {
  132.             set_dhudmessage(get_pcvar_num(g_pCvarSpecInfoColors[Red]), get_pcvar_num(g_pCvarSpecInfoColors[Green]), get_pcvar_num(g_pCvarSpecInfoColors[Blue]), HUD_SPECT_X, HUD_SPECT_Y, 0, 1.2, 1.1, 0.5, 0.6)
  133.            
  134.             if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
  135.             {
  136.                 new szHealth[15]
  137.                 AddCommas(get_user_health(iPlayer), szHealth, charsmax(szHealth))
  138.                
  139.                 if (ze_is_user_zombie(iPlayer))
  140.                 {
  141.                     show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "ZOMBIE_SPEC_COMMAS", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  142.                 }
  143.                 else if ((iPlayer == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
  144.                 {
  145.                     show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_SPEC_COMMAS_LEADER", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  146.                 }
  147.                 else
  148.                 {
  149.                     show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_SPEC_COMMAS", szName, szHealth, ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  150.                 }
  151.             }
  152.             else
  153.             {
  154.                 if (ze_is_user_zombie(iPlayer))
  155.                 {
  156.                     show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "ZOMBIE_SPEC", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  157.                 }
  158.                 else if ((iPlayer == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
  159.                 {
  160.                     show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_SPEC_LEADER", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  161.                 }
  162.                 else
  163.                 {
  164.                     show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_SPEC", szName, get_user_health(iPlayer), ze_get_escape_coins(iPlayer), ze_get_user_infects(iPlayer))
  165.                 }
  166.             }
  167.         }
  168.     }
  169.     else if (ze_is_user_zombie(iPlayer))
  170.     {
  171.         new szName[32]
  172.         get_user_name(iPlayer, szName, charsmax(szName))
  173.        
  174.         if (get_pcvar_num(g_pCvarHudInfoMode) == 1)
  175.         {
  176.             set_hudmessage(get_pcvar_num(g_pCvarZombieInfoColors[Red]), get_pcvar_num(g_pCvarZombieInfoColors[Green]), get_pcvar_num(g_pCvarZombieInfoColors[Blue]), HUD_STATS_X, HUD_STATS_Y, 0, 1.2, 1.1, 0.5, 0.6, -1)
  177.            
  178.             if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
  179.             {
  180.                 new szHealth[15]
  181.                 AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
  182.  
  183.                 ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "ZOMBIE_COMMAS", szName, szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  184.             }
  185.             else
  186.             {
  187.                 ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "ZOMBIE", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  188.             }
  189.         }
  190.         else if (get_pcvar_num(g_pCvarHudInfoMode) == 2)
  191.         {
  192.             set_dhudmessage(get_pcvar_num(g_pCvarZombieInfoColors[Red]), get_pcvar_num(g_pCvarZombieInfoColors[Green]), get_pcvar_num(g_pCvarZombieInfoColors[Blue]), HUD_STATS_X, HUD_STATS_Y, 0, 1.2, 1.1, 0.5, 0.6)
  193.            
  194.             if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
  195.             {
  196.                 new szHealth[15]
  197.                 AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
  198.                
  199.                 show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "ZOMBIE_COMMAS", szName, szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  200.             }
  201.             else
  202.             {
  203.                 show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "ZOMBIE", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))  
  204.             }
  205.         }
  206.     }
  207.     else
  208.     {
  209.         if (get_pcvar_num(g_pCvarHudInfoMode) == 1)
  210.         {
  211.             set_hudmessage(get_pcvar_num(g_pCvarHumanInfoColors[Red]), get_pcvar_num(g_pCvarHumanInfoColors[Green]), get_pcvar_num(g_pCvarHumanInfoColors[Blue]), HUD_STATS_X, HUD_STATS_Y, 0, 1.2, 1.1, 0.5, 0.6, -1)
  212.            
  213.             if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
  214.             {
  215.                 if ((ID_SHOWHUD == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
  216.                 {
  217.                     new szHealth[15]
  218.                     AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
  219.                
  220.                     ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_LEADER_COMMAS", szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  221.                 }
  222.                 else
  223.                 {
  224.                     new szHealth[15]
  225.                     AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
  226.                
  227.                     ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_COMMAS", szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  228.                 }                  
  229.             }
  230.             else
  231.             {
  232.                 if ((ID_SHOWHUD == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
  233.                 {
  234.                     ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN_LEADER", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  235.                 }
  236.                 else
  237.                 {
  238.                     ShowSyncHudMsg(ID_SHOWHUD, g_iMsgSync, "%L", LANG_PLAYER, "HUMAN", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  239.                 }                  
  240.             }
  241.         }
  242.         else if (get_pcvar_num(g_pCvarHudInfoMode) == 2)
  243.         {
  244.             set_dhudmessage(get_pcvar_num(g_pCvarHumanInfoColors[Red]), get_pcvar_num(g_pCvarHumanInfoColors[Green]), get_pcvar_num(g_pCvarHumanInfoColors[Blue]), HUD_STATS_X, HUD_STATS_Y, 0, 1.2, 1.1, 0.5, 0.6)
  245.            
  246.             if (get_pcvar_num(g_pCvarHudInfoComma) == 1)
  247.             {
  248.                 if ((ID_SHOWHUD == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
  249.                 {
  250.                     new szHealth[15]
  251.                     AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
  252.                
  253.                     show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_LEADER_COMMAS", szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  254.                 }
  255.                 else
  256.                 {
  257.                     new szHealth[15]
  258.                     AddCommas(get_user_health(ID_SHOWHUD), szHealth, charsmax(szHealth))
  259.                
  260.                     show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_COMMAS", szHealth, ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  261.                 }
  262.             }
  263.             else
  264.             {
  265.                 if ((ID_SHOWHUD == ze_get_escape_leader_id()) && (0 < get_pcvar_num(g_pCvarRankEnabled) <= 2))
  266.                 {
  267.                     show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN_LEADER", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  268.                 }
  269.                 else
  270.                 {
  271.                     show_dhudmessage(ID_SHOWHUD, "%L", LANG_PLAYER, "HUMAN", get_user_health(ID_SHOWHUD), ze_get_escape_coins(ID_SHOWHUD), ze_get_user_infects(ID_SHOWHUD))
  272.                 }
  273.             }
  274.         }
  275.     }
  276. }
You don't know? Learn and you will know.

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 477
Joined: 2 Years Ago
Has thanked: 18 times
Been thanked: 1 time
Contact:

#9

Post by czirimbolo » 3 Weeks Ago

L 06/21/2019 - 13:58:05: [AMXX] [0] ze_hud_info.sma::ShowHUD (line 111)
L 06/21/2019 - 13:58:06: String formatted incorrectly - parameter 9 (total 8)
L 06/21/2019 - 13:58:06: [AMXX] Displaying debug trace (plugin "ze_hud_info.amxx", version "1.4")
L 06/21/2019 - 13:58:06: [AMXX] Run time error 25: parameter error
L 06/21/2019 - 13:58:06: [AMXX] [0] ze_hud_info.sma::ShowHUD (line 227)
L 06/21/2019 - 13:58:07: String formatted incorrectly - parameter 9 (total 8)
L 06/21/2019 - 13:58:07: [AMXX] Displaying debug trace (plugin "ze_hud_info.amxx", version "1.4")
Image

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 477
Joined: 2 Years Ago
Has thanked: 18 times
Been thanked: 1 time
Contact:

#10

Post by czirimbolo » 3 Weeks Ago

can someone finally fix this code? or is a dead forum?
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest