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

Help / Support ZP Zomnie Class: Tanker


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hn.S Xmix
Member
Join Date: May 2021
Old 01-31-2023 , 17:22   ZP Zomnie Class: Tanker
Reply With Quote #1

Hello!

So i tried to make this class can't take any damage from head with helmet sound, its so simple but the only thing that i get is this error:

Quote:
Warning: Loose indentation on line 33
Error: Number of arguments does not match definition on line 63
I tried all day and this is what i have reached so far. Can any one give me a hand please

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#include <cstrike>
#include <cs_ham_bots_api>
#include <zp50_class_zombie>
#include <zombieplague>
#include <ColorChat>

#define HIT_SHIELD 8

new const zombieclass1_name[] = "Tanker Zombie"
new const zombieclass1_info[] = "=No Headshots="
new const zombieclass1_models[][] = { "zpm_headless" }
new const 
zombieclass1_clawmodels[][] = { "models/zombie_plague/v_knife_zombie.mdl" }
const 
zombieclass1_health 2800
const Float:zombieclass1_speed 0.80
const Float:zombieclass1_gravity 0.9
const Float:zombieclass1_knockback 1.0


new g_ZombieClassID

new g_iMaxPlayers
new g_cvarSHelmetThreshold

public plugin_init()
{
       
register_plugin("[ZP] Class: Tanker Zombie""1.0""Hn.S")
    
       
RegisterHam(Ham_TraceAttack"player""fw_traceattack")
       
RegisterHamBots(Ham_TraceAttack"fw_traceattack")
       
register_forward(FM_TraceLine"fw_traceattack"1)
       
g_iMaxPlayers get_maxplayers()
       
g_cvarSHelmetThreshold register_cvar("zp_class_tanker_head""0")
}

public 
plugin_precache()
{
    
    
    new 
index
    
    g_ZombieClassID 
zp_class_zombie_register(zombieclass1_namezombieclass1_infozombieclass1_healthzombieclass1_speedzombieclass1_gravity)
    
zp_class_zombie_register_kb(g_ZombieClassIDzombieclass1_knockback)
    for (
index 0index sizeof zombieclass1_modelsindex++)
        
zp_class_zombie_register_model(g_ZombieClassIDzombieclass1_models[index])
    for (
index 0index sizeof zombieclass1_clawmodelsindex++)
        
zp_class_zombie_register_claw(g_ZombieClassIDzombieclass1_clawmodels[index]) 
        
}

public 
fw_traceattack(victimattacker,Float:v1[3], Float:v2[3], fNoMonsterspentToSkipptr)
{
        if(!
is_user_alive(victim) || zp_class_zombie_get_current(victim) != g_ZombieClassID)
        return

    static 
iHitEntiHitEnt get_tr2(ptrTR_pHit)
    
    if(
<= iHitEnt <= g_iMaxPlayers)
    {
        static 
iArmor
        
static CsArmorType:tArmor
        
        iArmor 
zp_get_user_zombie(iHitEnttArmor)
        
        if(
iArmor && tArmor == CS_ARMOR_VESTHELM
        
&& get_tr2(ptrTR_iHitgroup) == HIT_HEAD)
        {
            
iHitEnt get_pcvar_num(g_cvarSHelmetThreshold// re-use iHitEnt
            
if(iHitEnt && iArmor >= iHitEnt)
                
iHitEnt HIT_SHIELD
            
else
                
iHitEnt HIT_GENERIC
            
            set_tr2
(ptrTR_iHitgroupiHitEnt)
        }
    }

    
//return FMRES_SUPERCEDE
}
public 
zp_user_infected_post(idinfector)
{    
    if (
zp_get_user_zombie_class(id) == g_ZombieClassID)
    {
        
ColorChat(idGREEN"^x01[^x04ZPM^x01] You're class is ^x04[^x01 Tanker Zombie ^x04]^x01 Your Skills :^x03 No Headshots.")
    }

Attached Files
File Type: sma Get Plugin or Get Source (zp_class_headless.sma - 48 views - 2.7 KB)
Hn.S Xmix 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 00:28.


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