Raised This Month: $32 Target: $400
 8% 

Subplugin Submission [ZP] Class: Chainsaw zombie


Post New Thread Reply   
 
Thread Tools Display Modes
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 01-25-2012 , 07:39   Re: [ZP] Class: Chainsaw zombie
Reply With Quote #11

what is the error?
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
K4rim
Senior Member
Join Date: Oct 2013
Location: Malaysia
Old 11-29-2013 , 13:56   Re: [ZP] Class: Chainsaw zombie
Reply With Quote #12

use with zp 5.0.8:

PHP Code:
L 11/30/2013 00:24:24Start of error session.
L 11/30/2013 00:24:24Info (map "de_dust2") (file "addons/amxmodx/logs/error_20131130.log")
L 11/30/2013 00:24:24: [ZPInvalid Player (0)
L 11/30/2013 00:24:24: [AMXXDisplaying debug trace (plugin "zp_chainsaw_zombie.amxx"version"0.1")
L 11/30/2013 00:24:24: [AMXXRun time error 10native error (native "zp_get_user_nemesis")
L 11/30/2013 00:24:24: [AMXX]    [0zp50_class_zombie_chainsaw.sma::fw_TakeDamage (line 100
K4rim is offline
CoCe16
Junior Member
Join Date: Dec 2013
Old 05-30-2019 , 12:02   Re: [ZP] Class: Chainsaw zombie
Reply With Quote #13

why are the chainsaw sounds played for all the zombie classes? is there any way to make these chainsaw sounds only for the CHAINSAW class? when i add this class to my server all the zombie classes are having these chainsaw sounds with knife.
CoCe16 is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 06-04-2019 , 03:48   Re: [ZP] Class: Chainsaw zombie
Reply With Quote #14

Quote:
Originally Posted by CoCe16 View Post
why are the chainsaw sounds played for all the zombie classes? is there any way to make these chainsaw sounds only for the CHAINSAW class? when i add this class to my server all the zombie classes are having these chainsaw sounds with knife.
Since the author is inactive, I edited the plugin:

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

new const zclass_name[] = { "Chainsaw Zombie" 
new const 
zclass_info[] = { "Chainsaw Zombie Class" 
new const 
zclass_model[] = { "zombie_chainsaw" 
new const 
zclass_clawmodel[] = { "v_chainsaw.mdl" }
const 
zclass_health 1800 
const zclass_speed 190
const Float:zclass_gravity 1.0 
const Float:zclass_knockback 1.0 

new g_iMaxPlayers
#define IsPlayer(%0) (1 <= %0 <= g_iMaxPlayers)


new g_zclassid1

new cvar_damage;

new const 
chainsaw_sounds[][] =
{
        
"zombie_plague/chainsaw2_miss.wav",
        
"zombie_plague/chainsaw1_miss.wav",
        
"zombie_plague/chainsaw2_miss.wav",
        
"zombie_plague/chainsaw1_hit.wav",
        
"zombie_plague/chainsaw2_hit.wav",
        
"zombie_plague/chainsaw1_hit.wav",
        
"zombie_plague/chainsaw1_miss.wav",
        
"zombie_plague/chainsaw2_miss.wav",
        
"zombie_plague/chainsaw1_hit.wav"
}

new const 
knife_sounds[][] =
{
    
"weapons/knife_deploy1.wav",
    
"weapons/knife_hit1.wav",
    
"weapons/knife_hit2.wav",
    
"weapons/knife_hit3.wav",
    
"weapons/knife_hit4.wav",
    
"weapons/knife_hitwall1.wav",
    
"weapons/knife_slash1.wav",
    
"weapons/knife_slash2.wav",
    
"weapons/knife_stab.wav"
}

public 
plugin_init()
{
    
register_plugin("[ZP] Chainsaw Zombie Class""0.1""Artos")
    
    
register_forward(FM_EmitSound"fw_EmitSound");
    
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
    
    
cvar_damage register_cvar("zp_chainsaw_damage""2.0");
        
g_iMaxPlayers get_maxplayers()
}

public 
plugin_precache()
{    
    
g_zclassid1 zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback

    for(new 
0sizeof chainsaw_soundsi++)
        
precache_sound(chainsaw_sounds[i])
}

public 
zp_user_infected_post(idinfector)
{
    if (
zp_get_user_zombie_class(id) == g_zclassid1)
        
client_print(idprint_chat"[ZP] You're using a chainsaw zombie class which have %s damage multiplier!"get_pcvar_float(cvar_damage))
}

public 
fw_EmitSound(idchannel, const sound[])
{
    if(!
is_user_alive(id) || !zp_get_user_zombie(id) || zp_get_user_survivor(id) || zp_get_user_zombie_class(id) != g_zclassid1)
        return 
FMRES_IGNORED
        
    
for(new 0sizeof chainsaw_soundsi++)
    {
        if(
equal(soundknife_sounds[i]))
        {
            
emit_sound(idchannelchainsaw_sounds[i], 1.0ATTN_NORM0PITCH_NORM)
            return 
FMRES_SUPERCEDE
        
}
    }
            
    return 
FMRES_IGNORED
}

public 
fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
    if (!
IsPlayer(attacker) || !is_user_connected(attacker) || zp_get_user_nemesis(attacker) || !zp_get_user_zombie(attacker))
        return 
HAM_IGNORED;
    
    if (
get_user_weapon(attacker) != CSW_KNIFE)
        return 
HAM_IGNORED;
    
    if (
zp_get_user_zombie_class(attacker) == g_zclassid1)
    {
        
damage *= get_pcvar_float(cvar_damage)
        
SetHamParamFloat(4damage)
    }
    
    return 
HAM_SUPERCEDE
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/ 
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.

Last edited by bibu; 06-04-2019 at 03:51.
bibu is offline
Rainq
Member
Join Date: Sep 2015
Old 02-05-2020 , 11:03   Re: [ZP] Class: Chainsaw zombie
Reply With Quote #15

Quote:
Originally Posted by bibu View Post
Since the author is inactive, I edited the plugin:

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

new const zclass_name[] = { "Chainsaw Zombie" 
new const 
zclass_info[] = { "Chainsaw Zombie Class" 
new const 
zclass_model[] = { "zombie_chainsaw" 
new const 
zclass_clawmodel[] = { "v_chainsaw.mdl" }
const 
zclass_health 1800 
const zclass_speed 190
const Float:zclass_gravity 1.0 
const Float:zclass_knockback 1.0 

new g_iMaxPlayers
#define IsPlayer(%0) (1 <= %0 <= g_iMaxPlayers)


new g_zclassid1

new cvar_damage;

new const 
chainsaw_sounds[][] =
{
        
"zombie_plague/chainsaw2_miss.wav",
        
"zombie_plague/chainsaw1_miss.wav",
        
"zombie_plague/chainsaw2_miss.wav",
        
"zombie_plague/chainsaw1_hit.wav",
        
"zombie_plague/chainsaw2_hit.wav",
        
"zombie_plague/chainsaw1_hit.wav",
        
"zombie_plague/chainsaw1_miss.wav",
        
"zombie_plague/chainsaw2_miss.wav",
        
"zombie_plague/chainsaw1_hit.wav"
}

new const 
knife_sounds[][] =
{
    
"weapons/knife_deploy1.wav",
    
"weapons/knife_hit1.wav",
    
"weapons/knife_hit2.wav",
    
"weapons/knife_hit3.wav",
    
"weapons/knife_hit4.wav",
    
"weapons/knife_hitwall1.wav",
    
"weapons/knife_slash1.wav",
    
"weapons/knife_slash2.wav",
    
"weapons/knife_stab.wav"
}

public 
plugin_init()
{
    
register_plugin("[ZP] Chainsaw Zombie Class""0.1""Artos")
    
    
register_forward(FM_EmitSound"fw_EmitSound");
    
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
    
    
cvar_damage register_cvar("zp_chainsaw_damage""2.0");
        
g_iMaxPlayers get_maxplayers()
}

public 
plugin_precache()
{    
    
g_zclassid1 zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback

    for(new 
0sizeof chainsaw_soundsi++)
        
precache_sound(chainsaw_sounds[i])
}

public 
zp_user_infected_post(idinfector)
{
    if (
zp_get_user_zombie_class(id) == g_zclassid1)
        
client_print(idprint_chat"[ZP] You're using a chainsaw zombie class which have %s damage multiplier!"get_pcvar_float(cvar_damage))
}

public 
fw_EmitSound(idchannel, const sound[])
{
    if(!
is_user_alive(id) || !zp_get_user_zombie(id) || zp_get_user_survivor(id) || zp_get_user_zombie_class(id) != g_zclassid1)
        return 
FMRES_IGNORED
        
    
for(new 0sizeof chainsaw_soundsi++)
    {
        if(
equal(soundknife_sounds[i]))
        {
            
emit_sound(idchannelchainsaw_sounds[i], 1.0ATTN_NORM0PITCH_NORM)
            return 
FMRES_SUPERCEDE
        
}
    }
            
    return 
FMRES_IGNORED
}

public 
fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
    if (!
IsPlayer(attacker) || !is_user_connected(attacker) || zp_get_user_nemesis(attacker) || !zp_get_user_zombie(attacker))
        return 
HAM_IGNORED;
    
    if (
get_user_weapon(attacker) != CSW_KNIFE)
        return 
HAM_IGNORED;
    
    if (
zp_get_user_zombie_class(attacker) == g_zclassid1)
    {
        
damage *= get_pcvar_float(cvar_damage)
        
SetHamParamFloat(4damage)
    }
    
    return 
HAM_SUPERCEDE
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/ 
1.
Code:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// zp_chainsaw_zombie.sma
// D:\Counter-Strike 1.6\FOLDER ZM 2019 RAINQ THE BEST\FISIERE RAINQ 2\Addons Zombie SMA\zp_chainsaw_zombie.sma(58) : warning 217: loose indentation
// Header size:            924 bytes
// Code size:             2304 bytes
// Data size:             3020 bytes
// Stack/heap size:      16384 bytes; estimated max. usage=44 cells (176 bytes)
// Total requirements:   22632 bytes
//
// 1 Warning.
// Done.
//
// Compilation Time: 0.17 sec
// ----------------------------------------

Press enter to exit ...
2.your plugin makes it impossible for the last man to be killed
__________________

Leul şi tigru sunt mai puternici ca lupul,dar lupul la circ nu participă.
Rainq is offline
Reply


Thread Tools
Display Modes

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 14:26.


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