Recently I have been trying making one plugin, but I cant change the fov it gives me this error:
Code:
L 06/17/2009 - 18:57:36: [AMXX] [0] zp_class_chicken.sma::client_PostThink (line 56)
L 06/17/2009 - 18:57:36: Plugin called message_begin with an invalid message id (0).
L 06/17/2009 - 18:57:36: [AMXX] Displaying debug trace (plugin "zp_class_chicken.amxx")
L 06/17/2009 - 18:57:36: [AMXX] Run time error 10: native error (native "message_begin")
Where's the sma:
PHP Code:
#include <amxmodx>
#include <zombieplague>
#include <engine>
#include <fakemeta>
// Zombie Attributes
new const zclass_name[] = "Chicken" // name
new const zclass_info[] = "HP-- Speed++ Knockback+ Gravity-" // description
new const zclass_model[] = "chicken" // model
new const zclass_clawmodel[] = "v_knife_zombie.mdl" // claw model
const zclass_health = 1000 // health
const zclass_speed = 270 // speed
const Float:zclass_gravity = 0.5 // gravity
const Float:zclass_knockback = 1.5 // knockback
// Class IDs
new gmsgSetFOV
new ChickenVision = 135
new g_zclass_chicken
static const TITLE[] = "[ZP] Chicken Class"
static const VERSION[] = "0.5"
static const AUTHOR[] = "DiSc0nNeT3d"
public plugin_init()
{
register_plugin(TITLE,VERSION,AUTHOR)
}
public plugin_precache()
{
g_zclass_chicken = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
}
public client_PostThink(id)
{
if(!is_user_alive(id) || !zp_get_user_zombie(id)) return PLUGIN_CONTINUE
if(zp_get_user_zombie_class(id) != g_zclass_chicken) return PLUGIN_CONTINUE
message_begin(MSG_ONE, gmsgSetFOV, {0,0,0}, id)
write_byte(ChickenVision) // fov angle
message_end()
return PLUGIN_CONTINUE
}
Can someone help me?
By the way I would use some help to change the hitzones.
(I'm sorry for bad english...)