Raised This Month: $ Target: $400
 0% 

ShadowIdx, Whats the problem?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
dogandcat
BANNED
Join Date: Jan 2009
Old 03-26-2009 , 12:41   Re: ShadowIdx, Whats the problem?
Reply With Quote #5

so... whats the problem now?this dont work :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

//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 zp_user_infected_post(id, infector)
{
    if (zp_get_user_zombie_class(id) == g_invisible)
    {
        invisible(id)
    }
}
        
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 ();
    }
    set_task(0.1, "ShadowIdx", id)
}

public invisible(id)
{
    if (zp_get_user_zombie_class(id) == g_invisible && zp_get_user_zombie(id) && !zp_get_user_nemesis(id))
    {
        ShadowIdx(id)
    }
}
dogandcat is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode