Well, if you dont send my ask to the trash it will be better.i have foun nothing on the search, so y want to ask here!.
i cant put this to work, whats is the problem?:S
Code:
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
#include <hamsandwich>
// Zombie Attributes
new const zclass_name[] = { "Zombie Invisible" } // name
new const zclass_info[] = { "Totalmente Invisible" } // description
new const zclass_model[] = { "zombie_source" } // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" } // claw model
const zclass_health = 10 // health
const zclass_speed = 200 // speed
const Float:zclass_gravity = 0.92 // gravity
const Float:zclass_knockback = 3.0 // knockback
// Class IDs
new g_invisible
new g_has_invisibility[33]
//shadow message
new g_MsgShadow
// Zombie Classes MUST be registered on plugin_precache
public plugin_precache()
{
g_invisible = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
}
public plugin_init()
{
register_plugin("[ZP] Class: Invisible", "0.1", "MasI");
g_MsgShadow = get_user_msgid ( "ShadowIdx" );
}
public fw_PlayerPreThink(player)
{
if(!is_user_alive(player))
return FMRES_IGNORED
if(zp_get_user_zombie(player) && zp_get_user_zombie_class(player) == g_invisible)
set_pev(player, pev_flTimeStepSound, 999)
return FMRES_IGNORED
}
stock fm_set_user_footsteps(id, bool:set = true)
{
set_pev(id, pev_flTimeStepSound,set ? 999 : 400)
has_silent[id] = set
return 1
}
public ShadowIdx(id)
{
// Not alive
if (!is_user_alive(id))
return;
if (zp_get_user_zombie_class(id) == g_invisible && zp_get_user_zombie(id) && !zp_get_user_nemesis(id) && is_user_connected(id))
{
message_begin ( MSG_ONE_UNRELIABLE, g_MsgShadow, _, id );
write_long ( 0 );
message_end ();
}
}