Raised This Month: $51 Target: $400
 12% 

[Zp] Otra ayuda con zClasses


  
 
 
Thread Tools Display Modes
Author Message
JorG
Junior Member
Join Date: Mar 2012
Old 04-12-2012 , 21:09   [Zp] Otra ayuda con zClasses
#1

Bueno cuando quise agregar mas clases de zombies me tira 1 error que no lo puedo solucionar.

Error.
PHP Code:
ErrorUndefined symbol "zclass_name" on line 111 
Linea.
PHP Code:
    g_zclass_deimos zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockbackzclass_lvl
PD: Y si no es error de name es error de info y asi. SAlu2
JorG is offline
Geoslide
Senior Member
Join Date: Jun 2011
Location: Chilean player
Old 04-12-2012 , 21:13   Re: [Zp] Otra ayuda con zClasses
#2

Te tradusco el error.

Nunca registras "zclass_name" en el plugin.
__________________
Basebuilder V6 - plugin for sale
Jailbreak V6 - plugin for sale
more plugins in progress ...

Geoslide ?
Geoslide is offline
JorG
Junior Member
Join Date: Mar 2012
Old 04-12-2012 , 21:17   Re: [Zp] Otra ayuda con zClasses
#3

Pero al plugins me lo compila perfecto.
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <engine>
#include <zombieplague>

// Zombie Attributes
new const zclass_name[] = "Deimos Zombie" // name
new const zclass_info[] = "| G -> Drop Human Weapon" // description
new const zclass_model[] = "deimos_zombi_origin" // model
new const zclass_clawmodel[] = "v_knife_deimos_zombi.mdl" // claw model
const zclass_health 2000 // health
const zclass_speed 280 // speed
const Float:zclass_gravity 1.0 // gravity
const Float:zclass_knockback 1.0 // knockback
const zclass_lvl // level

new g_zclass_deimos
new bool:can_use_skill[33]

new 
trail_spr
new exp_spr

const m_flTimeWeaponIdle 48
const m_flNextAttack 83

new const light_classname[] = "deimos_skill"
new const skill_start[] = "zombie_plague/deimos_skill_start.wav"
new const skill_hit[] = "zombie_plague/deimos_skill_hit.wav"

#define TASK_WAIT 11111
#define TASK_ATTACK 22222
#define TASK_COOLDOWN 33333

const WPN_NOT_DROP = ((1<<2)|(1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_KNIFE)|(1<<CSW_C4))

new 
cvar_cooldown


public plugin_init()
{
    
register_plugin("[ZP] Zombie Class: Deimos""1.0""Dias")
    
    
cvar_cooldown register_cvar("zp_deimos_cooldown""30")
    
    
register_forward(FM_Touch"fw_Touch")
    
register_clcmd("drop""use_skill")
}

public 
plugin_precache()
{
    
trail_spr precache_model("sprites/zb3/trail.spr")
    
exp_spr precache_model("sprites/zb3/deimosexp.spr")
    
    
precache_sound(skill_start)
    
precache_sound(skill_hit)
    
    
g_zclass_deimos zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockbackzclass_lvl)    
}

public 
zp_user_infected_post(idinfector)
{
    if (
zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_zclass_deimos)
    {
        
can_use_skill[id] = true
        client_print
(idprint_chat"[ZP] You are Deimos Zombie, Aim and Press (G) to Drop Human Weapon")
    }
}

public 
use_skill(id)
{
    if (
zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_zclass_deimos && !zp_get_user_nemesis(id))
    {
        if(
can_use_skill[id])
        {
            
do_skill(id)
            
can_use_skill[id] = false
        
} else {
            
client_print(idprint_chat"[ZP] You can't use your skill now...")
        }
    }
}

public 
do_skill(id)
{
    
play_weapon_anim(id8)
    
set_weapons_timeidle(id7.0)
    
set_player_nextattack(id0.5)
    
PlayEmitSound(idskill_start)
    
entity_set_int(idEV_INT_sequence10)

    
set_task(0.5"launch_light"id+TASK_ATTACK)
}

public 
launch_light(taskid)
{
    new 
id taskid TASK_ATTACK
    
if (task_exists(id+TASK_ATTACK)) remove_task(id+TASK_ATTACK)
    
    if (!
is_user_alive(id)) return;
    
    
// check
    
new FloatfOrigin[3], Float:fAngle[3],FloatfVelocity[3]
    
pev(idpev_originfOrigin)
    
pev(idpev_view_ofsfAngle)
    
fm_velocity_by_aim(id2.0fVelocityfAngle)
    
fAngle[0] *= -1.0
    
    
// create ent
    
new ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))
    
set_pev(entpev_classnamelight_classname)
    
engfunc(EngFunc_SetModelent"models/w_hegrenade.mdl")
    
set_pev(entpev_minsFloat:{-1.0, -1.0, -1.0})
    
set_pev(entpev_maxsFloat:{1.01.01.0})
    
set_pev(entpev_originfOrigin)
    
fOrigin[0] += fVelocity[0]
    
fOrigin[1] += fVelocity[1]
    
fOrigin[2] += fVelocity[2]
    
set_pev(entpev_movetypeMOVETYPE_BOUNCE)
    
set_pev(entpev_gravity0.01)
    
fVelocity[0] *= 1000
    fVelocity
[1] *= 1000
    fVelocity
[2] *= 1000
    set_pev
(entpev_velocityfVelocity)
    
set_pev(entpev_ownerid)
    
set_pev(entpev_anglesfAngle)
    
set_pev(entpev_solidSOLID_BBOX)                        //store the enitty id
    
    // invisible ent
    
fm_set_rendering(entkRenderFxGlowShell000kRenderTransAlpha0)
    
    
// show trail    
    
message_beginMSG_BROADCASTSVC_TEMPENTITY )
    
write_byte(TE_BEAMFOLLOW)
    
write_short(ent)                //entity
    
write_short(trail_spr)        //model
    
write_byte(5)        //10)//life
    
write_byte(3)        //5)//width
    
write_byte(209)                    //r, hegrenade
    
write_byte(120)                    //g, gas-grenade
    
write_byte(9)                    //b
    
write_byte(200)        //brightness
    
message_end()                    //move PHS/PVS data sending into here (SEND_ALL, SEND_PVS, SEND_PHS)
    
    
client_print(idprint_chat"[ZP] You have to wait %i seconds to continue use skill !!!"get_pcvar_num(cvar_cooldown))
    
set_task(get_pcvar_float(cvar_cooldown), "reset_cooldown"id+TASK_COOLDOWN)
    
    return;
}

public 
reset_cooldown(taskid)
{
    new 
id taskid TASK_COOLDOWN
    
    
if (zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_zclass_deimos && !zp_get_user_nemesis(id))
    {
        
can_use_skill[id] = true
        client_print
(idprint_chat"[ZP] Now. You can use your skill. Aim and Press (G)")
    }
}

public 
fw_Touch(entvictim)
{
    if (!
pev_valid(ent)) return FMRES_IGNORED
    
    
new EntClassName[32]
    
entity_get_string(entEV_SZ_classnameEntClassNamecharsmax(EntClassName))
    
    if (
equal(EntClassNamelight_classname)) 
    {
        
light_exp(entvictim)
        
remove_entity(ent)
        return 
FMRES_IGNORED
    
}
    
    return 
FMRES_IGNORED
}

light_exp(entvictim)
{
    if (!
pev_valid(ent)) return;
    
    if (
is_user_alive(victim) && !zp_get_user_zombie(victim) && !zp_get_user_survivor(victim))
    {
        new 
wpnwpnname[32]
        
wpn get_user_weapon(victim)
        if( !(
WPN_NOT_DROP & (1<<wpn)) && get_weaponname(wpnwpnnamecharsmax(wpnname)) )
        {
            
engclient_cmd(victim"drop"wpnname)
        }
    }
    
    
// create effect
    
static Float:origin[3];
    
pev(entpev_originorigin);
    
message_begin(MSG_BROADCAST,SVC_TEMPENTITY); 
    
write_byte(TE_EXPLOSION); // TE_EXPLOSION
    
write_coord(floatround(origin[0])); // origin x
    
write_coord(floatround(origin[1])); // origin y
    
write_coord(floatround(origin[2])); // origin z
    
write_short(exp_spr); // sprites
    
write_byte(40); // scale in 0.1's
    
write_byte(30); // framerate
    
write_byte(14); // flags 
    
message_end(); // message end
    
    // play sound exp
    
PlayEmitSound(entskill_hit)
}

PlayEmitSound(id, const sound[])
{
    
emit_sound(idCHAN_WEAPONsound1.0ATTN_NORM0PITCH_NORM)
}

play_weapon_anim(playeranim)
{
    
set_pev(playerpev_weaponanimanim)
    
message_begin(MSG_ONESVC_WEAPONANIM, {000}, player)
    
write_byte(anim)
    
write_byte(pev(playerpev_body))
    
message_end()
}

fm_velocity_by_aim(iIndexFloat:fDistanceFloat:fVelocity[3], Float:fViewAngle[3])
{
    
//new Float:fViewAngle[3]
    
pev(iIndexpev_v_anglefViewAngle)
    
fVelocity[0] = floatcos(fViewAngle[1], degrees) * fDistance
    fVelocity
[1] = floatsin(fViewAngle[1], degrees) * fDistance
    fVelocity
[2] = floatcos(fViewAngle[0]+90.0degrees) * fDistance
    
return 1
}

get_weapon_ent(idweaponid)
{
    static 
wname[32], weapon_ent
    get_weaponname
(weaponidwnamecharsmax(wname))
    
weapon_ent fm_find_ent_by_owner(-1wnameid)
    return 
weapon_ent
}

set_weapons_timeidle(idFloat:timeidle)
{
    new 
entwpn get_weapon_ent(idget_user_weapon(id))
    if (
pev_valid(entwpn)) set_pdata_float(entwpnm_flTimeWeaponIdletimeidle+3.04)
}

set_player_nextattack(idFloat:nexttime)
{
    
set_pdata_float(idm_flNextAttacknexttime4)
}

stock fm_find_ent_by_owner(entity, const classname[], owner)
{
    while ((
entity engfunc(EngFunc_FindEntityByStringentity"classname"classname)) && pev(entitypev_owner) != owner) { /* keep looping */ }
    return 
entity;
}

stock fm_set_rendering(entityfx kRenderFxNone255255255render kRenderNormalamount 16)
{
    static 
Float:color[3]
    
color[0] = float(r)
    
color[1] = float(g)
    
color[2] = float(b)
    
    
set_pev(entitypev_renderfxfx)
    
set_pev(entitypev_rendercolorcolor)
    
set_pev(entitypev_rendermoderender)
    
set_pev(entitypev_renderamtfloat(amount))

Y al agregar al zclasses me tira ese error. Tengo asi las clases
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>

/*================================================================================
 [Plugin Customization]
=================================================================================*/

// Fast Jumper Zombie Attributes
new const zclass2_name[] = { "Fast Jumper" }
new const 
zclass2_info[] = { "Low Gravity,Fast" }
new const 
zclass2_model[] = { "fast_jumper" }
new const 
zclass2_clawmodel[] = { "v_fast_jumper.mdl" }
const 
zclass2_health 2500
const zclass2_speed 320
const Float:zclass2_gravity 0.4
const Float:zclass2_knockback 0.8
const zclass2_lvl 

// Raptor Zombie Attributes
new const zclass3_name[] = { "Raptor Zombie" }
new const 
zclass3_info[] = { "HP-- Speed++ Knockback++" }
new const 
zclass3_model[] = { "zombie_source" }
new const 
zclass3_clawmodel[] = { "v_knife_zombie.mdl" }
const 
zclass3_health 900
const zclass3_speed 225
const Float:zclass3_gravity 1.0
const Float:zclass3_knockback 1.5
const zclass3_lvl 

// Classic Zombie Attributes
new const zclass5_name[] = { "Classic Zombie" }
new const 
zclass5_info[] = { "=Balanced=" }
new const 
zclass5_model[] = { "zombie_source" }
new const 
zclass5_clawmodel[] = { "v_knife_zombie.mdl" }
const 
zclass5_health 1800
const zclass5_speed 190
const Float:zclass5_gravity 1.0
const Float:zclass5_knockback 1.0
const zclass5_lvl 

// Poison Zombie Attributes
new const zclass6_name[] = { "Poison Zombie" }
new const 
zclass6_info[] = { "HP- Jump+ Knockback+" }
new const 
zclass6_model[] = { "zombie_source" }
new const 
zclass6_clawmodel[] = { "v_knife_zombie.mdl" }
const 
zclass6_health 1400
const zclass6_speed 190
const Float:zclass6_gravity 0.75
const Float:zclass6_knockback 1.25
const zclass6_lvl 

// Big Zombie Attributes
new const zclass8_name[] = { "Big Zombie" }
new const 
zclass8_info[] = { "HP++ Speed- Knockback--" }
new const 
zclass8_model[] = { "zombie_source" }
new const 
zclass8_clawmodel[] = { "v_knife_zombie.mdl" }
const 
zclass8_health 2700
const zclass8_speed 155
const Float:zclass8_gravity 1.0
const Float:zclass8_knockback 0.5
const zclass8_lvl 

// Leech Zombie Attributes
new const zclass14_name[] = { "Leech Zombie" }
new const 
zclass14_info[] = { "HP- Knockback+ Leech++" }
new const 
zclass14_model[] = { "zombie_source" }
new const 
zclass14_clawmodel[] = { "v_knife_zombie.mdl" }
const 
zclass14_health 1300
const zclass14_speed 190
const Float:zclass14_gravity 1.0
const Float:zclass14_knockback 1.25
const zclass14_infecthp 200 // extra hp for infections
const zclass14_lvl 

/*============================================================================*/

// Class IDs
new g_zclass_leechg_zclass_deimos

// Zombie Classes MUST be registered on plugin_precache
public plugin_precache()
{
    
register_plugin("[ZP] Default Zombie Classes""4.3""MeRcyLeZZ")
    
    
// Register all classes
    
zp_register_zombie_class(zclass2_namezclass2_infozclass2_modelzclass2_clawmodelzclass2_healthzclass2_speedzclass2_gravityzclass2_knockbackzclass2_lvl)
    
zp_register_zombie_class(zclass3_namezclass3_infozclass3_modelzclass3_clawmodelzclass3_healthzclass3_speedzclass3_gravityzclass3_knockbackzclass3_lvl)
    
zp_register_zombie_class(zclass5_namezclass5_infozclass5_modelzclass5_clawmodelzclass5_healthzclass5_speedzclass5_gravityzclass5_knockbackzclass5_lvl)
    
zp_register_zombie_class(zclass6_namezclass6_infozclass6_modelzclass6_clawmodelzclass6_healthzclass6_speedzclass6_gravityzclass6_knockbackzclass6_lvl)
    
zp_register_zombie_class(zclass8_namezclass8_infozclass8_modelzclass8_clawmodelzclass8_healthzclass8_speedzclass8_gravityzclass8_knockbackzclass8_lvl)
    
g_zclass_leech zp_register_zombie_class(zclass14_namezclass14_infozclass14_modelzclass14_clawmodelzclass14_healthzclass14_speedzclass14_gravityzclass14_knockbackzclass14_lvl)
    
g_zclass_deimos zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockbackzclass_lvl)
}

// User Infected forward
public zp_user_infected_post(idinfector)
{
    
// If attacker is a leech zombie, gets extra hp
    
if (zp_get_user_zombie_class(infector) == g_zclass_leech)
        
set_pev(infectorpev_healthfloat(pev(infectorpev_health) + zclass14_infecthp))

JorG is offline
Geoslide
Senior Member
Join Date: Jun 2011
Location: Chilean player
Old 04-12-2012 , 21:19   Re: [Zp] Otra ayuda con zClasses
#4

Muestra el plugin que te tira error (al que le has agregado la clase).
__________________
Basebuilder V6 - plugin for sale
Jailbreak V6 - plugin for sale
more plugins in progress ...

Geoslide ?
Geoslide is offline
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 04-12-2012 , 21:28   Re: [Zp] Otra ayuda con zClasses
#5

te tira error por q no lo pasaste al zclass o no lo ves? u.u
__________________

www.amxmodx-es.com

Steam: Luchokoldo
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
JorG
Junior Member
Join Date: Mar 2012
Old 04-12-2012 , 21:33   Re: [Zp] Otra ayuda con zClasses
#6

Quote:
Originally Posted by rak View Post
te tira error por q no lo pasaste al zclass o no lo ves? u.u
Hee no entendi Me explicas
JorG is offline
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 04-12-2012 , 21:46   Re: [Zp] Otra ayuda con zClasses
#7

Quote:
Originally Posted by JorG View Post
Hee no entendi Me explicas
para q quieres agregar la clase zm al zclass? si desde el sma de la clase zombie lo registra y se puede usar

y lo q decia es q nunca agregaste

PHP Code:
// Zombie Attributes
new const zclass_name[] = "Deimos Zombie" // name
new const zclass_info[] = "| G -> Drop Human Weapon" // description
new const zclass_model[] = "deimos_zombi_origin" // model
new const zclass_clawmodel[] = "v_knife_deimos_zombi.mdl" // claw model
const zclass_health 2000 // health
const zclass_speed 280 // speed
const Float:zclass_gravity 1.0 // gravity
const Float:zclass_knockback 1.0 // knockback
const zclass_lvl // level 
al sma del zclass
__________________

www.amxmodx-es.com

Steam: Luchokoldo
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
JorG
Junior Member
Join Date: Mar 2012
Old 04-12-2012 , 22:03   Re: [Zp] Otra ayuda con zClasses
#8

Ha yo solo agregando el plugins ya me agrega esa clase a mi zp?
JorG is offline
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 04-12-2012 , 22:12   Re: [Zp] Otra ayuda con zClasses
#9

si.. no es necesario agregarlo al zclass
__________________

www.amxmodx-es.com

Steam: Luchokoldo
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
JorG
Junior Member
Join Date: Mar 2012
Old 04-12-2012 , 22:39   Re: [Zp] Otra ayuda con zClasses
#10

Gracias raK ^^
JorG 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 23:21.


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