Raised This Month: $ Target: $400
 0% 

Problem with a class of zombie


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-09-2009 , 16:50   Problem with a class of zombie
Reply With Quote #1

i have this:

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>

#define PLUGIN "[ZP] Clase : Zombie Incandescente"
#define VERSION "1.0"
#define AUTHOR "alan_el_more"

new g_zclaseaura[33], g_maxplayers

// Zombie Attributes
new const zclass_name[] = { "Zombie Incandescente" // nombre
new const zclass_info[] = { "Aura" // descripcion
new const zclass_model[] = { "zombie_source" // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" // model de las manos
const zclass_health 5000 // vida
const zclass_speed // velocidad
const Float:zclass_gravity 1.0 // gravedad
const Float:zclass_knockback 1.0 // knockback
const zclass_infecthp 500 // vida extra por infeccion

public plugin_init()

    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_forward(FM_PlayerPreThink"FwdPrethink")
    
register_event("DeathMsg""player_die""a")
    
g_maxplayers get_maxplayers()
}
public 
plugin_precache()
{
    
g_zclase zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback
}

public 
zp_user_infected_post(playerinfector)
{
    if (
zp_get_user_zombie_class(player) == g_zclase)
        
aura[player] = true
}

public 
zp_user_humanized_post(id)
{
    if(
aura[id])
        
aura[id] = false
}
public 
player_die()
{
    for(new 
idid <= g_maxplayersid++)
    if(
aura[id])
        
aura[id] = false
}

public 
FwdPrethink(id)
{
    if(!
aura[id] || !is_user_alive(id))
        return
    
    if (
zp_get_user_zombie_class(id) == g_zclase)    
    {
        static 
Float:originF[3]            
        
pev(idpev_originoriginF)
        
        
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
        
write_byte(TE_DLIGHT)
        
engfunc(EngFunc_WriteCoordoriginF[0])
        
engfunc(EngFunc_WriteCoordoriginF[1])
        
engfunc(EngFunc_WriteCoordoriginF[2])
        
write_byte(10// radio
        
write_byte(255// rojo
        
write_byte(0// verde
        
write_byte(0)  // azul
        
write_byte(2)
        
write_byte(0)
        
message_end()
    }

The problem is that the zombie does not move.
Does anyone i could solve?
Thanks in advance
__________________
alan_el_more is offline
Anggara_nothing
Veteran Member
Join Date: Jan 2009
Location: Indonesia
Old 04-09-2009 , 21:10   Re: Problem with a class of zombie
Reply With Quote #2

Quote:
Originally Posted by alan_el_more View Post
i have this:

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>

#define PLUGIN "[ZP] Clase : Zombie Incandescente"
#define VERSION "1.0"
#define AUTHOR "alan_el_more"

new g_zclaseaura[33], g_maxplayers

// Zombie Attributes
new const zclass_name[] = { "Zombie Incandescente" // nombre
new const zclass_info[] = { "Aura" // descripcion
new const zclass_model[] = { "zombie_source" // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" // model de las manos
const zclass_health 5000 // vida
const zclass_speed // velocidad
const Float:zclass_gravity 1.0 // gravedad
const Float:zclass_knockback 1.0 // knockback
const zclass_infecthp 500 // vida extra por infeccion

public plugin_init()

    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_forward(FM_PlayerPreThink"FwdPrethink")
    
register_event("DeathMsg""player_die""a")
    
g_maxplayers get_maxplayers()
}
public 
plugin_precache()
{
    
g_zclase zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback
}

public 
zp_user_infected_post(playerinfector)
{
    if (
zp_get_user_zombie_class(player) == g_zclase)
        
aura[player] = true
}

public 
zp_user_humanized_post(id)
{
    if(
aura[id])
        
aura[id] = false
}
public 
player_die()
{
    for(new 
idid <= g_maxplayersid++)
    if(
aura[id])
        
aura[id] = false
}

public 
FwdPrethink(id)
{
    if(!
aura[id] || !is_user_alive(id))
        return
    
    if (
zp_get_user_zombie_class(id) == g_zclase)    
    {
        static 
Float:originF[3]            
        
pev(idpev_originoriginF)
        
        
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
        
write_byte(TE_DLIGHT)
        
engfunc(EngFunc_WriteCoordoriginF[0])
        
engfunc(EngFunc_WriteCoordoriginF[1])
        
engfunc(EngFunc_WriteCoordoriginF[2])
        
write_byte(10// radio
        
write_byte(255// rojo
        
write_byte(0// verde
        
write_byte(0)  // azul
        
write_byte(2)
        
write_byte(0)
        
message_end()
    }

The problem is that the zombie does not move.
Does anyone i could solve?
Thanks in advance
because, you set speed is 1.
Quote:
const zclass_speed = 1
Anggara_nothing is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-09-2009 , 21:28   Re: Problem with a class of zombie
Reply With Quote #3

I had not seen him, thank you
__________________
alan_el_more is offline
Anggara_nothing
Veteran Member
Join Date: Jan 2009
Location: Indonesia
Old 04-09-2009 , 21:38   Re: Problem with a class of zombie
Reply With Quote #4

Quote:
Originally Posted by alan_el_more View Post
I had not seen him, thank you
oh, no problem. i like to helping people.
Anggara_nothing is offline
Reply



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 02:22.


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