Quote:
Originally Posted by last_hope
zp50 Armorer Human FIXED:
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)
{
set_task( 3.0, "fuckin_hclass", id )
}
public fuckin_hclass(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;
}
|
too many spans error logs
Run time error 10: native error (native "zp_class_human_get_current")
[0] zp5.0_human_armor.sma::fuckin_hclass (line 37)
[ZP] Invalid Player (16)
public fuckin_hclass(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;
}
line 37 if (zp_class_human_get_current(id) == g_HumanClassID)