sup everybody, i was testing the human armorer sma of Joker Laugh and if it works but the problem is that all human classes have armor also, how I can fix this?
this is the code:
PHP Code:
#include <amxmodx>
#include <fun>
#include <zp50_class_human>
#include <zp50_core>
#include <zp50_colorchat>
#include <cstrike>
// Raptor Human Attributes
new const humanclass2_name[] = "Armorer Human"
new const humanclass2_info[] = "Gets armor"
new const humanclass2_models[][] = { "terror" }
const humanclass2_health = 100
const Float:humanclass2_speed = 1.1
const Float:humanclass2_gravity = 1.0
new g_HumanClassID, cvar_armor
public plugin_precache()
{
register_plugin("[ZP] Class: Human: Pounder", ZP_VERSION_STRING, "ZP Dev Team")
g_HumanClassID = zp_class_human_register(humanclass2_name, humanclass2_info, humanclass2_health, humanclass2_speed, humanclass2_gravity)
new index
for (index = 0; index < sizeof humanclass2_models; index++)
zp_class_human_register_model(g_HumanClassID, humanclass2_models[index])
cvar_armor = register_cvar("zp_class_human_armorer", "40")
}
public zp_fw_core_spawn_post(id)
{
if (zp_class_human_get_current(id) == g_HumanClassID)
{
zp_colored_print(id, "You are using^x04Armorer hclass^x01, you now have^x04%s^x01 armor.", get_pcvar_num(cvar_armor))
cs_set_user_armor(id, get_pcvar_num(cvar_armor), CS_ARMOR_KEVLAR)
}
return PLUGIN_HANDLED;
}