Raised This Month: $ Target: $400
 0% 

debugged plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dragonix
Junior Member
Join Date: Sep 2012
Old 05-08-2013 , 15:52   debugged plugin
Reply With Quote #1

I added some extra classes and gives me some errors at compile time and do not understand why?if you can help me solve them

errors


.sma
Dragonix is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 05-08-2013 , 16:30   Re: debugged plugin
Reply With Quote #2

Just change the g_ variables to their proper variables.
Torge is offline
Dragonix
Junior Member
Join Date: Sep 2012
Old 05-08-2013 , 16:35   Re: debugged plugin
Reply With Quote #3

I do not understand you can help me pretty please
Dragonix is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 05-08-2013 , 16:48   Re: debugged plugin
Reply With Quote #4

As I can see those classes aren't even used in the code. They just registred.

Try:

Code:
/*============================================ ====================================

-----------------------------------
-*- [BB] New Classes -*-
-----------------------------------

~~~~~~~~~~~~~~~
- Description -
~~~~~~~~~~~~~~~

This plugin adds the bonus zombie classes into Base Builder.

All classes have been balanced, but feel free to edit them if
you are not satisfied.

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

#include <amxmodx>
#include <fakemeta>
#include <basebuilder>
#include <hamsandwich>
#include <fun>
#include <xs>

/*============================================ =============================/*============================================ ====================================
[Plugin Customization]
============================================= ====================================*/
// Classic Zombie Attributes
new const zclass1_name[] = { "Spawn" }
new const zclass1_info[] = { "=Echilibrat=" }
new const zclass1_model[] = { "v_bb_malefic" }
new const zclass1_clawmodel[] = { "v_zm_malefic" }
const zclass1_health = 3000
const zclass1_speed = 310
const Float:zclass1_gravity = 0.8
const zclass1_admin = ADMIN_ALL
const zclass1_credits = 0

// Chainsaw Attributes
new const zclass2_name[] = { "Chainsaw Maniac" }
new const zclass2_info[] = { "HP+ DMG+" }
new const zclass2_model[] = { "bb_chainsaw" }
new const zclass2_clawmodel[] = { "v_sawww" }
const zclass2_health = 4000
const zclass2_speed = 260
const Float:zclass2_gravity = 0.85
const zclass2_admin = ADMIN_ALL
const zclass2_credits = 0
#define CHAINSAW_DAMAGE 2.5

// Banshee Attributes
new const zclass3_name[] = { "Predator" }
new const zclass3_info[] = { "Semiclip + Invizibilitate" }
new const zclass3_model[] = { "zmhelladmn" }
new const zclass3_clawmodel[] = { "v_predator123" }
const zclass3_health = 3500
const zclass3_speed = 280
const Float:zclass3_gravity = 0.85
const zclass3_admin = ADMIN_ALL
const zclass3_credits = 0
#define BANSHEE_RENDERAMT 90

// Charger Attributes
new const zclass4_name[] = { "Alive Tree" }
new const zclass4_info[] = { "HP++ Speed- Charge" }
new const zclass4_model[] = { "treee" }
new const zclass4_clawmodel[] = { "v_tree_h" }
const zclass4_health = 6500
const zclass4_speed = 210
const Float:zclass4_gravity = 0.9
const zclass4_admin = ADMIN_ALL
const zclass4_credits = 0

// Lycan Attributes
new const zclass5_name[] = { "Alien" }
new const zclass5_info[] = { "Gravity + Speed + Hp -" }
new const zclass5_model[] = { "v_bb_alien" }
new const zclass5_clawmodel[] = { "v_zm_alien" }
const zclass5_health = 3500
const zclass5_speed = 370
const Float:zclass5_gravity = 0.5
const zclass5_admin = ADMIN_ALL
const zclass5_credits = 0

// Shadow Attributes
new const zclass6_name[] = { "Shadow" }
new const zclass6_info[] = { "Speed +" }
new const zclass6_model[] = { "v_bb_shadow" }
new const zclass6_clawmodel[] = { "v_zm_shadow" }
const zclass6_health = 2000
const zclass6_speed = 360
const Float:zclass6_gravity = 0.4
const zclass6_admin = ADMIN_ALL
const zclass6_credits = 0

// Liker Attributes
new const zclass7_name[] = { "Liker" }
new const zclass7_info[] = { "Hp + Gravity" }
new const zclass7_model[] = { "v_bb_licker" }
new const zclass7_clawmodel[] = { "v_zm_licker" }
const zclass7_health = 10000
const zclass7_speed = 320
const Float:zclass7_gravity = 0.3
const zclass7_admin = ADMIN_ALL
const zclass7_credits = 0

// Leon Attributes
new const zclass8_name[] = { "Leon" }
new const zclass8_info[] = { "Speed + Hp + Gravity" }
new const zclass8_model[] = { "v_bb_leon" }
new const zclass8_clawmodel[] = { "v_zm_leon" }
const zclass8_health = 10000
const zclass8_speed = 300
const Float:zclass8_gravity = 0.4
const zclass8_admin = ADMIN_IMMUNITY
const zclass8_credits = 0

// Distrugator Attributes
new const zclass9_name[] = { "Distrugator" }
new const zclass9_info[] = { "Regeneration + Speed + Hp + Gravity" }
new const zclass9_model[] = { "v_bb_distrugator" }
new const zclass9_clawmodel[] = { "v_zm_super_shadow" }
const zclass9_health = 4500
const zclass9_speed = 310
const Float:zclass9_gravity = 0.75
const zclass9_admin = ADMIN_IMMUNITY
const zclass9_credits = 0

//Every 2 seconds, regenerates 2.5% max health
#define REGENERATION_DELAY 2.5
#define HEAL_ALGORITHM (get_user_health(id) + (zclass9_health * 0.025))

// Knockback Attributes
new const zclass10_name[] = { "Super Shadow" }
new const zclass10_info[] = { "Knockback + Speed + Hp +" }
new const zclass10_model[] = { "v_bb_super_shadow" }
new const zclass10_clawmodel[] = { "v_zm_distrugator" }
const zclass10_health = 4000
const zclass10_speed = 400
const Float:zclass10_gravity = 0.4
const zclass10_admin = ADMIN_IMMUNITY
const zclass10_credits = 0

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

new bool:g_isSolid[33]
new bool:g_isSemiClip[33]
new g_iPlayers[32], g_iNum, g_iPlayer

new g_zclass_saw
new g_zclass_banshee
new g_zclass_charger
new g_zclass_regenerator
new g_zclass_lycan
new g_zclass_distrugator
new g_zclass_knockback

#define SOUND_DELAY 3.0
new Float: g_fSoundDelay[33]

new Float: g_fRegenDelay[33]
#define PAINSHOCK 108

#define IP_SERVER_LICENTIAT "93.114.82.56"

#define g_ChainsawRev "basebuilder/zombie/chainsaw_rev2.wav"
#define g_BansheeScream "basebuilder/zombie/banshee_scream3.wav"
#define g_ChargerRoar "basebuilder/zombie/charger_roar2.wav"
#define g_LycanAttack "basebuilder/zombie/wolf_attack1.wav"
#define g_LycanHowl "basebuilder/zombie/wolf_spawn1.wav"

// Zombie Classes MUST be registered on plugin_precache
#define VERSION "6.8"
public plugin_precache()
{

register_plugin("BB Classes", VERSION, "JohNNy*")
register_cvar("bb_credit_classes", VERSION, FCVAR_SPONLY|FCVAR_SERVER)
set_cvar_string("bb_credit_classes", VERSION)

precache_sound(g_ChainsawRev)
precache_sound(g_BansheeScream)
precache_sound(g_ChargerRoar)
precache_sound(g_LycanAttack)
precache_sound(g_LycanHowl)

// Register all classes
g_zclass_saw = bb_register_zombie_class(zclass1_name, zclass1_info, zclass1_model, zclass1_clawmodel, zclass1_health, zclass1_speed, zclass1_gravity, 0.0, zclass1_admin, zclass1_credits)
g_zclass_banshee = bb_register_zombie_class(zclass2_name, zclass2_info, zclass2_model, zclass2_clawmodel, zclass2_health, zclass2_speed, zclass2_gravity, 0.0, zclass2_admin, zclass2_credits)
g_zclass_charger = bb_register_zombie_class(zclass3_name, zclass3_info, zclass3_model, zclass3_clawmodel, zclass3_health, zclass3_speed, zclass3_gravity, 0.0, zclass3_admin, zclass3_credits)
g_zclass_lycan = bb_register_zombie_class(zclass4_name, zclass4_info, zclass4_model, zclass4_clawmodel, zclass4_health, zclass4_speed, zclass4_gravity, 0.0, zclass4_admin, zclass4_credits)
g_zclass_regenerator = bb_register_zombie_class(zclass5_name, zclass5_info, zclass5_model, zclass5_clawmodel, zclass5_health, zclass5_speed, zclass5_gravity, 0.0, zclass5_admin, zclass5_credits)
g_zclass_distrugator = bb_register_zombie_class(zclass9_name, zclass9_info, zclass9_model, zclass9_clawmodel, zclass9_health, zclass9_speed, zclass9_gravity, 0.0, zclass9_admin, zclass9_credits)
g_zclass_knockback = bb_register_zombie_class(zclass10_name, zclass10_info, zclass10_model, zclass10_clawmodel, zclass10_health, zclass10_speed, zclass10_gravity, 0.0, zclass10_admin, zclass10_credits)
}

public plugin_init()
{
RegisterHam(Ham_TakeDamage, "player", "ham_TakeDamage")
RegisterHam(Ham_TakeDamage, "player", "ham_TakeDamage_Post", 1)
RegisterHam(Ham_Spawn, "player", "ham_PlayerSpawn_Post", 1)

register_forward(FM_PlayerPreThink, "fw_PlayerPreThink");
register_forward(FM_PlayerPostThink, "fw_PlayerPostThink");
register_forward(FM_AddToFullPack, "fw_addToFullPack", 1)
register_forward(FM_EmitSound, "fw_EmitSound")
}

public ham_TakeDamage(victim, inflictor, attacker, Float:damage, damagebits)
{
if (!pev_valid(victim) || !is_user_connected(attacker))
return HAM_IGNORED

if (zp_get_user_zombie_class(attacker) == g_zclass_saw)
damage*=CHAINSAW_DAMAGE

SetHamParamFloat(4, damage)
return HAM_HANDLED
}

public ham_PlayerSpawn_Post(id)
{
if (!is_user_alive(id))
return ;

if (bb_is_user_zombie(id) && zp_get_user_zombie_class(id) == g_zclass_banshee)
set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransTexture, BANSHEE_RENDERAMT)
else
set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 90)
}

public fw_PlayerPreThink(id)
{
if (!is_user_alive(id) || !is_user_connected(id))
return FMRES_IGNORED

if (zp_get_user_zombie_class(id) == g_zclass_regenerator && bb_is_user_zombie(id))
{
static Float: fGameTime;
fGameTime = get_gametime();
if (g_fRegenDelay[id] < fGameTime)
{
g_fRegenDelay[id] = fGameTime + REGENERATION_DELAY;

new iHealth = floatround(HEAL_ALGORITHM);
iHealth = clamp(iHealth, 0, zclass9_health);
set_user_health(id, iHealth);
}
}

get_players(g_iPlayers, g_iNum, "a")

static i
for (i = 0; i < g_iNum; i++)
{
g_iPlayer = g_iPlayers[i]
if (!g_isSemiClip[g_iPlayer])
g_isSolid[g_iPlayer] = true
else
g_isSolid[g_iPlayer] = false
}

if (g_isSolid[id])
for (i = 0; i < g_iNum; i++)
{
g_iPlayer = g_iPlayers[i]

if (!g_isSolid[g_iPlayer] || g_iPlayer == id || !bb_is_user_zombie(id) || zp_get_user_zombie_class(id) != g_zclass_banshee)
continue
if (get_user_team(g_iPlayer) != get_user_team(id))
continue

set_pev(g_iPlayer, pev_solid, SOLID_NOT)
g_isSemiClip[g_iPlayer] = true
}

return FMRES_IGNORED	
}

public fw_PlayerPostThink(id)
{
if (!is_user_alive(id))
return FMRES_IGNORED

get_players(g_iPlayers, g_iNum, "a")

static i
for (i = 0; i < g_iNum; i++)
{
g_iPlayer = g_iPlayers[i]
if (g_isSemiClip[g_iPlayer])
{
set_pev(g_iPlayer, pev_solid, SOLID_SLIDEBOX)
g_isSemiClip[g_iPlayer] = false
}
}

return FMRES_IGNORED
}

public fw_addToFullPack(es, e, ent, host, hostflags, player, pSet)
{
if ( !player )
return FMRES_SUPERCEDE;

if(player)
{
if (!is_user_alive(host) || !g_isSolid[host])
return FMRES_IGNORED
if (get_user_team(ent) != get_user_team(host))
return FMRES_IGNORED

set_es(es, ES_Solid, SOLID_NOT)
}
return FMRES_IGNORED
}

public fw_EmitSound(id,channel,const sample[],Float:volume,Float:attn,flags,pitch)
{
if (!is_user_connected(id) || !bb_is_user_zombie(id) || bb_is_build_phase() || bb_is_prep_phase())
return FMRES_IGNORED;

if ((g_fSoundDelay[id] + SOUND_DELAY) < get_gametime())
{
if (equal(sample[8], "kni", 3))
{
if (equal(sample[14], "sla", 3) || equal(sample[14], "hit", 3) || equal(sample[14], "sta", 3)) // slash
{
if (zp_get_user_zombie_class(id) == g_zclass_saw)
{
emit_sound(id,CHAN_ITEM,g_ChainsawRev,volume, attn,flags,pitch)
g_fSoundDelay[id] = get_gametime()
return FMRES_SUPERCEDE;
}
else if (zp_get_user_zombie_class(id) == g_zclass_banshee)
{
emit_sound(id,CHAN_ITEM,g_BansheeScream,volum e,attn,flags,pitch)
g_fSoundDelay[id] = get_gametime()
return FMRES_SUPERCEDE;
}
else if (zp_get_user_zombie_class(id) == g_zclass_charger)
{
emit_sound(id,CHAN_ITEM,g_ChargerRoar,volume, attn,flags,pitch)
g_fSoundDelay[id] = get_gametime()

static Float: velocity[3];
velocity_by_aim(id, 400, velocity);
set_pev(id, pev_velocity, velocity);

return FMRES_SUPERCEDE;
}
else if (zp_get_user_zombie_class(id) == g_zclass_lycan)
{
emit_sound(id,CHAN_ITEM,g_LycanAttack,volume, attn,flags,pitch)
g_fSoundDelay[id] = get_gametime()
return FMRES_SUPERCEDE;
}
}
}
}
//else
//g_fSoundDelay[id] = get_gametime()

return FMRES_IGNORED
}

public bb_zombie_class_set(id, class)
{
if (!is_user_alive(id))
return ;

if (class == g_zclass_lycan && !bb_is_build_phase())
emit_sound(id,CHAN_STATIC,g_LycanHowl,VOL_NOR M,ATTN_NORM,0,PITCH_NORM)

return ;
}

public ham_TakeDamage_Post(victim, inflictor, attacker, Float:damage, bits)
{
if(bb_get_user_zombie_class(victim) == g_zclass_knockback && bb_is_user_zombie(victim))
{
set_pdata_float(victim, PAINSHOCK, 1.0, 5)
}
}
Torge is offline
Dragonix
Junior Member
Join Date: Sep 2012
Old 05-08-2013 , 16:55   Re: debugged plugin
Reply With Quote #5

I appeared some errors now and those who were persistent

I would like to be able to use all classes were first time this plugin we added 6 classes and I 4 and I want to be able to use them and those

Last edited by Dragonix; 05-08-2013 at 16:57.
Dragonix is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-09-2013 , 03:53   Re: debugged plugin
Reply With Quote #6

I don't see any errors in your screenshot.
__________________

Last edited by fysiks; 05-09-2013 at 03:53.
fysiks is offline
Dragonix
Junior Member
Join Date: Sep 2012
Old 05-09-2013 , 04:37   Re: debugged plugin
Reply With Quote #7

Dragonix 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 17:13.


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