hello, I have no idea how to put this part to show the information in the plugin, someone help me?
obs: the Data Display only needs to be selected for this class for the player
plugin:
PHP Code:
/*================================================================================
----------------------------------
-*- [ZP] Class: Human: Spy -*-
----------------------------------
This plugin is part of Zombie Plague Mod and is distributed under the
terms of the GNU General Public License. Check ZP_ReadMe.txt for details.
================================================================================*/
#include <amxmodx>
#include <zp50_class_human>
// Classic Human Attributes
new const humanclass1_name[] = "Human spy"
new const humanclass1_info[] = "\y[\dshow hud information zombie\y]"
new const humanclass1_models[][] = { "arctic" , "guerilla" , "leet" , "terror" , "gign" , "gsg9" , "sas" , "urban" }
const humanclass1_health = 100
const Float:humanclass1_speed = 0.90
const Float:humanclass1_gravity = 1.0
new g_HumanClassID
new g_spy[33]
public plugin_precache()
{
register_plugin("[ZP] Class: Human: Spy", ZP_VERSION_STRING, "BRAVOK")
g_HumanClassID = zp_class_human_register(humanclass1_name, humanclass1_info, humanclass1_health, humanclass1_speed, humanclass1_gravity)
new index
for (index = 0; index < sizeof humanclass1_models; index++)
zp_class_human_register_model(g_HumanClassID, humanclass1_models[index])
}
if(!is_user_bot(id) && is_user_connected(id) && g_spy[id] == true)
{
new zmb = read_data(2)
if(g_spy[id] == true && zp_get_user_zombie(zmb))
{
new hp = get_user_health(zmb)
new ap = zp_get_user_ammo_packs(zmb)
new zm = zp_get_zombie_count()
new name[32]
get_user_name(zmb,name,31)
set_hudmessage(0, 255, 0, -1.0, 0.1, 0, 2.0, 1.5, 0.1, 0.2, 13)
ShowSyncHudMsg(id, g_status_sync, "Name: %s^nHealth: %i^nAmmo Packs: %i^nZombies Left: %i", name, hp, ap, zm)
}
}
}
I need this to work
PHP Code:
if(!is_user_bot(id) && is_user_connected(id) && g_spy[id] == true)
{
new zmb = read_data(2)
if(g_spy[id] == true && zp_get_user_zombie(zmb))
{
new hp = get_user_health(zmb)
new ap = zp_get_user_ammo_packs(zmb)
new zm = zp_get_zombie_count()
new name[32]
get_user_name(zmb,name,31)
set_hudmessage(0, 255, 0, -1.0, 0.1, 0, 2.0, 1.5, 0.1, 0.2, 13)
ShowSyncHudMsg(id, g_status_sync, "Name: %s^nHealth: %i^nAmmo Packs: %i^nZombies Left: %i", name, hp, ap, zm)
}
}
}
__________________