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

I can not compile zombie class plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jievylook
Senior Member
Join Date: Sep 2018
Old 04-09-2019 , 20:55   I can not compile zombie class plugin
Reply With Quote #1

Hi all .
When I want to compile a zombie class plugin like the following, I have an error in line 4 as you can see in the attached image.

Can someone help me with this problem?



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

#define PLUGIN "[ZP] Class - Hunter"
#define VERSION "1.1"
#define AUTHOR "HoRRoR"


// Zombie Attributes
new const zclass_name[] = "Hunter" // name
new const zclass_info[] = "- Can run very fast" // description
new const zclass_model[] = "zombie_hunter" // model
new const zclass_clawmodel[] = "v_zombie.mdl" // claw model
const zclass_health 2000 // health
const zclass_speed 260 // speed
const Float:zclass_gravity 1.15 // gravity
const Float:zclass_knockback 2.5 // knockback

// --- config ------------------------ //
#define TRAIL_LIFE        2
#define TRAIL_WIDTH       10
#define TRAIL_RED         90
#define TRAIL_GREEN       200 
#define TRAIL_BLUE        90
#define TRAIL_BRIGTHNESS  220

new Float:g_fastspeed 1000.0 // sprint speed
new Float:g_normspeed 260.0 // norm speed. must be as zclass_speed
new Float:g_abilonecooldown 20.0 // cooldown time
new Float:g_abilonelenght 2.0 // time of sprint
new const sound_hunter_sprint[] = "zombie_plague/spells/zombie_hunter/sprint.wav" //sprint sound
// ----------------------------------- //

new i_cooldown_time[33]
new 
g_zclass_hunter
new g_speeded[33] = 0
new g_abil_one_used[33] = 0
new gTrail
new g_maxplayers

public plugin_precache()
{
    
g_zclass_hunter zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)    
    
precache_sound(sound_hunter_sprint)
}

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("ability1""use_ability_one")
    
register_concmd("ability1""use_ability_one")
    
    
register_forwardFM_PlayerPreThink"client_prethink" )
    
register_logevent("roundStart"2"1=Round_Start")
    
    
g_maxplayers get_maxplayers()

    
gTrail engfunc(EngFunc_PrecacheModel,"sprites/smoke.spr")
}


public 
client_prethink(id)
{
    if (
zp_get_user_zombie_class(id) == g_zclass_hunter)
    {
        if(
is_user_alive(id) && zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_zclass_hunter) && !zp_get_user_nemesis(id))
        
Action(id);
    }
}

public 
Action(id)
{
    if (
g_speeded[id] == 1)
    {
        
set_user_maxspeed(id g_fastspeed); 
    }
    else
    {
        
set_user_maxspeed(id g_normspeed); 
    }
        return 
PLUGIN_HANDLED;


public 
roundStart()
{
    for (new 
1<= g_maxplayersi++)
    {
        
i_cooldown_time[i] = floatround(g_abilonecooldown)
        
g_abil_one_used[i] = 0
        g_speeded
[i] = 0
        remove_task
(i)
        
client_cmd(i,"cl_forwardspeed 400")
        
client_cmd(i,"cl_backspeed 400")
    }
}

public 
ShowHUD(id)
{
    if(
is_user_alive(id))
    {
        
i_cooldown_time[id] = i_cooldown_time[id] - 1;
        
set_hudmessage(20010000.750.9201.01.10.00.0, -1)
        
show_hudmessage(id"Sprint cooldown: %d",i_cooldown_time[id])
    }else{
        
remove_task(id)
    }
}

public 
use_ability_one(id)
{
    if (
is_user_alive(id) && (zp_get_user_zombie_class(id) == g_zclass_hunter) && zp_get_user_zombie(id) && !zp_get_user_nemesis(id))
    {
        
        if(
g_abil_one_used[id] == 0)
        {    
            
client_cmd(id,"cl_forwardspeed 1600")
            
client_cmd(id,"cl_backspeed 1600")
    
            
message_begin (MSG_BROADCAST,SVC_TEMPENTITY)
            
write_byte (TE_BEAMFOLLOW)
            
write_short (id)
            
write_short (gTrail)
            
write_byte (TRAIL_LIFE)
            
write_byte (TRAIL_WIDTH)
            
write_byte (TRAIL_RED)
            
write_byte (TRAIL_GREEN)
            
write_byte (TRAIL_BLUE)
            
write_byte (TRAIL_BRIGTHNESS)
            
message_end()

            
g_speeded[id] = 1
            emit_sound
(idCHAN_STREAMsound_hunter_sprint1.0ATTN_NORM0PITCH_NORM)
            
g_abil_one_used[id] = 1
            set_task
(g_abilonelenght,"set_normal_speed",id)
                        
            
i_cooldown_time[id] = floatround(g_abilonecooldown)
            
set_task(1.0"ShowHUD"id__"a",i_cooldown_time[id])
//            client_print(id,print_chat,"[dev] - use ability")
        
}        
    }
}

public 
set_normal_speed(id)
{
    if ((
zp_get_user_zombie_class(id) == g_zclass_hunter) && zp_get_user_zombie(id) && !zp_get_user_nemesis(id))
    {
        
g_speeded[id] = 0
        client_cmd
(id,"cl_forwardspeed 400")
        
client_cmd(id,"cl_backspeed 400")
        
set_task(g_abilonecooldown,"set_ability_one_cooldown",id)
//        client_print(id,print_chat,"[dev] - executed 'set normal speed' task")
    
}
}

public 
set_ability_one_cooldown(id)
{
    if ((
zp_get_user_zombie_class(id) == g_zclass_hunter) && zp_get_user_zombie(id) && !zp_get_user_nemesis(id))
    {
        
g_abil_one_used[id] = 0
        
new text[100]
        
format(text,99,"^x04[ZP]^x01 Your ability ^x04Sprint^x01 is ready.")
        
message_begin(MSG_ONE,get_user_msgid("SayText"),{0,0,0},id
        
write_byte(id
        
write_string(text
        
message_end()
    }
}

public 
zp_user_infected_post(idinfector)
{
    if ((
zp_get_user_zombie_class(id) == g_zclass_hunter) && !zp_get_user_nemesis(id))
    {
        
        new 
text[100]
        new 
note_cooldown floatround(g_abilonecooldown)
        
format(text,99,"^x04[ZP]^x01 Your ability is ^x04Sprint^x01. Cooldown:^x04 %d ^x01seconds.",note_cooldown)
        
message_begin(MSG_ONE,get_user_msgid("SayText"),{0,0,0},id
        
write_byte(id
        
write_string(text
        
message_end()
        
        
i_cooldown_time[id] = floatround(g_abilonecooldown)
        
remove_task(id)
        
g_speeded[id] = 0
        g_abil_one_used
[id] = 0
        client_cmd
(id,"bind F1 ability1")
    }
}

public 
zp_user_humanized_post(id)
{
    
remove_task(id)
    
client_cmd(id,"cl_forwardspeed 400")
    
client_cmd(id,"cl_backspeed 400")

Attached Images
File Type: jpg Captura.JPG (33.1 KB, 49 views)
jievylook is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 04-10-2019 , 13:26   Re: I can not compile zombie class plugin
Reply With Quote #2

you need zombieplague.inc file in include folder
__________________
Check my original plugins for cs 1.6 and subscribe on channel
Look at the video bellow to see zombie frost grenade

https://youtu.be/j0zspNfN-AM?si=_1IiGPETN-GQY9Ua

Look at the video below to see Zombie blind grenade

https://youtu.be/ORC7ZmoaipQ?si=QC8Bul96QGitUwX4
Krtola is offline
Send a message via Skype™ to Krtola
jievylook
Senior Member
Join Date: Sep 2018
Old 04-10-2019 , 23:51   Re: I can not compile zombie class plugin
Reply With Quote #3

Quote:
Originally Posted by Krtola View Post
you need zombieplague.inc file in include folder
Thanks! All is perfect!
jievylook is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 04-11-2019 , 08:19   Re: I can not compile zombie class plugin
Reply With Quote #4

Quote:
Originally Posted by jievylook View Post
Thanks! All is perfect!
Nice
__________________
Check my original plugins for cs 1.6 and subscribe on channel
Look at the video bellow to see zombie frost grenade

https://youtu.be/j0zspNfN-AM?si=_1IiGPETN-GQY9Ua

Look at the video below to see Zombie blind grenade

https://youtu.be/ORC7ZmoaipQ?si=QC8Bul96QGitUwX4
Krtola is offline
Send a message via Skype™ to Krtola
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 18:52.


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