При опит за компилация ми излиза следната грешка - https://prnt.sc/FBLNPzuIfvMp.
Кода на плъгина:
Код за потвърждение: Избери целия код
/*
Credits:
SiR
*/
#include < amxmodx >
#include < zombieplague >
#include < hamsandwich >
#include <fakemeta>
#define PLUGIN "[ZP] Class: Jumper"
#define VERSION "1.0"
#define AUTHOR "djbosma"
new const zclass_name[] = { "Jumper" }
new const zclass_info[] = { "Launch \rDuck + Jump + Aim" }
new const zclass_model[] = { "fter_jump" }
new const zclass_clawmodel[] = { "v_jump.mdl" }
const zclass_health = 3200
const zclass_speed = 300
const Float:zclass_gravity = 0.8
const Float:zclass_knockback = 1.0
new g_jumper
new bool:g_CanJumpAgain[33]
new Float:g_nextjump[33]
new g_able[33]
new bool: is_jumper[33] = false
enum cvar
{
height,
force,
cool
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_CmdStart,"event_CmdStart")
}
public plugin_precache()
{
g_jumper = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
}
public plugin_natives()
{
register_native("is_jumper", "check_jumper", 1)
}
public check_jumper(player)
{
return is_jumper[player];
}
public client_putinserver(player)
{
g_able[player] = false
g_CanJumpAgain[player] = false
}
public client_disconnected(player)
{
g_able[player] = false
g_CanJumpAgain[player] = false
}
public zp_user_infected_post(player, infector)
{
if (zp_get_user_zombie_class(player) == g_jumper)
{
g_able[player] = true
g_CanJumpAgain[player] = true
g_nextjump[player] = get_gametime()
is_jumper[player] = true
}
else
{
is_jumper[player] = false
}
return PLUGIN_CONTINUE
}
public event_CmdStart(player, uc_handle, seed)
{
static buttons, flags
static Float:velocity[3]
static Float:oldvelocity[3]
if (!is_user_alive(player)) return FMRES_IGNORED
if (!g_able[player]) return FMRES_IGNORED
if (g_nextjump[player] > get_gametime()) return FMRES_IGNORED
if(zp_get_user_zombie_class(player) != g_jumper)
return FMRES_IGNORED
if(!zp_get_user_zombie(player) || zp_get_user_nemesis(player))
return FMRES_IGNORED
flags = pev(player, pev_flags)
if (!(g_CanJumpAgain[player]))
{
if(!(flags & FL_DUCKING) && (flags & FL_ONGROUND))
g_CanJumpAgain[player] = true
return FMRES_IGNORED
}
buttons = get_uc(uc_handle, UC_Buttons)
pev(player, pev_velocity, oldvelocity)
if ((flags & FL_ONGROUND) && (buttons & IN_JUMP) && (buttons & IN_DUCK) && g_CanJumpAgain[player])
{
g_CanJumpAgain[player] = false
g_nextjump[player] = get_gametime() + 10.0 //cooldown
velocity_by_aim(player, 240 , velocity) //force 200
velocity[0] += oldvelocity[0]*0.4
velocity[1] += oldvelocity[1]*0.4
velocity[2] += oldvelocity[2]*0.4
if(velocity[2] < 0.0) velocity[2] = 0.0
velocity[2] += 300 //height 250
set_pev(player, pev_velocity, velocity)
blast(player)
}
return FMRES_IGNORED
}
stock blast(player)
{
static origin[3]
get_user_origin(player, origin)
message_begin(MSG_PVS, SVC_TEMPENTITY, origin, player)
write_byte(TE_DLIGHT)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2])
write_byte(10)
write_byte(255)
write_byte(255)
write_byte(255)
write_byte(20)
write_byte(4)
message_end()
// write_byte(radius in 10's)
// write_byte(red)
// write_byte(green)
// write_byte(blue)
// write_byte(brightness)
// write_byte(life in 10's)
// write_byte(decay rate in 10's)
message_begin(MSG_PVS, SVC_TEMPENTITY, origin, player)
write_byte(TE_DLIGHT)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2])
write_byte(10)
write_byte(255)
write_byte(255)
write_byte(255)
write_byte(20)
write_byte(4)
message_end()
}