Banshee Zombie (Fix)

Useless Stuffs, Spam ... etc
User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 633
Joined: 2 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 19
Contact:

Banshee Zombie (Fix)

#1

Post by Spir0x » 9 Months Ago

Hey all please help me to fix this banshee zombie class when i click 5. Banshee Zombie nothing happen ! i want to run it.

Code: Select all

#include <zombie_escape>
#include <ze_zombies_class>
#include <ze_vip>
#include < engine >
 
#define _PLUGIN     "[ZP] Zombie Class: Banshee Zombie"
#define _VERSION                  "1.1"
#define _AUTHOR                "H.RED.ZONE"
 
#define VIP_FLAGS VIP_A
 
#define _MarkPlayerConnected(%0)  _bitPlayer[Connected] |= (1 << (%0 & 31))
#define _ClearPlayerConnected(%0) _bitPlayer[Connected] &= ~(1 << (%0 & 31))
#define _IsPlayerConnected(%0)    _bitPlayer[Connected] & (1 << (%0 & 31))
 
#define _MarkPlayerAlive(%0)  _bitPlayer[Alive] |= (1 << (%0 & 31))
#define _ClearPlayerAlive(%0) _bitPlayer[Alive] &= ~(1 << (%0 & 31))
#define _IsPlayerAlive(%0)    _bitPlayer[Alive] & (1 << (%0 & 31))
 
#define _MarkPlayerZombie(%0)  _bitPlayer[Zombie] |= (1 << (%0 & 31))
#define _ClearPlayerZombie(%0) _bitPlayer[Zombie] &= ~(1 << (%0 & 31))
#define _IsPlayerZombie(%0)    _bitPlayer[Zombie] & (1 << (%0 & 31))
 
#define _MarkPlayerBanshee(%0)  _bitPlayer[Banshee] |= (1 << (%0 & 31))
#define _ClearPlayerBanshee(%0) _bitPlayer[Banshee] &= ~(1 << (%0 & 31))
#define _IsPlayerBanshee(%0)    _bitPlayer[Banshee] & (1 << (%0 & 31))
 
#define _MarkPlayerHasBats(%0)  _bitPlayer[HasBats] |= (1 << (%0 & 31))
#define _ClearPlayerHasBats(%0) _bitPlayer[HasBats] &= ~(1 << (%0 & 31))
#define _IsPlayerHasBats(%0)    _bitPlayer[HasBats] & (1 << (%0 & 31))
 
#define _MarkPlayerInTrouble(%0)  _bitPlayer[InTrouble] |= (1 << (%0 & 31))
#define _ClearPlayerInTrouble(%0) _bitPlayer[InTrouble] &= ~(1 << (%0 & 31))
#define _IsPlayerInTrouble(%0)    _bitPlayer[InTrouble] & (1 << (%0 & 31))
 
#define fm_get_entity_flags(%1)    pev(%1, pev_flags)
 
enum _Bits {
    HasBats,
    InTrouble,
    Alive,
    Connected,
    Zombie,
    Banshee
}
 
new _bitPlayer[_Bits]
 
new const zclass_name[] = "Banshee Zombie"
new const zclass_info[] = "Press F"
const zclass_health = 50000
const zclass_speed = 350
const zclass_gravity = 600
 
new const _BAT_ModEL[] = "models/Premuim_ZE/bat_witch.mdl"
new const _ENT_ClaSS[] = "bat_witch"
 
enum (+= 110) {
    TASK_BAT_FLY,
    TASK_HOOK_HUMAN,
    TASK_THROW_BAT,
    TASK_COOLDOWN
}
 
enum _Cvar {
    _Cooldown,
    _RemoveBet_Time,
    _Hook_speed
}
 
new pCvar [_Cvar]
 
new gClass_BansheeID
new gExplosion_Spr
new gEntity
 
new g_Bat_Mode[33]
new g_Target[33]
 
public plugin_init() {
    register_plugin(_PLUGIN, _VERSION, _AUTHOR)
   
    register_impulse(100, "_THrow_Bats")
    register_touch(_ENT_ClaSS, "*", "_FW_Touch")
    register_event("HLTV", "_Event_NewRound", "1=0", "2=0")
   
    RegisterHam(Ham_Killed, "player", "_FW_Player_Killed", 1)
    RegisterHam(Ham_Spawn, "player", "_FW_Player_Spawn", 1 );
    RegisterHam(Ham_Touch, "player", "_FW_Player_Touch", 0)
   
    pCvar[_Cooldown] = register_cvar("ze_banshee_cooldown","30.0")
    pCvar[_RemoveBet_Time] = register_cvar("ze_banshee_time_removebat","10.0")
    pCvar[_Hook_speed] = register_cvar("ze_banshee_hook_speed","320.0")
}
 
public plugin_precache() {
    gClass_BansheeID = ze_register_zombie_class(zclass_name, zclass_info, zclass_health, zclass_speed, zclass_gravity)
 
    gExplosion_Spr = precache_model("sprites/zerogxplode.spr")
    precache_model(_BAT_ModEL)
}
 
public client_connect(plr) {
    _MarkPlayerConnected(plr)
}
 
public client_disconnected(plr) {
    _ClearPlayerConnected(plr)
}
 
public _FW_Player_Spawn(plr) {
    if(_IsPlayerConnected(plr)) {
        _MarkPlayerAlive(plr)
    }
}
 
public ze_select_zombie_class_pre(id, classid)
{
    if (classid != gClass_BansheeID)
        return ZE_CLASS_AVAILABLE
 
    if (~(ze_get_vip_flags(id) & VIP_FLAGS))
        return ZE_CLASS_UNAVAILABLE
 
    ze_add_zombie_class_menu_text("\y[\rVIP\y]")
 
    return ZE_CLASS_AVAILABLE
}
 
public ze_select_zombie_class_post(id, classid)
{
    if (classid != gClass_BansheeID)
        return
 
    ze_set_next_zombie_class(id, gClass_BansheeID)
}
 
public ze_user_infected(_plr) {
    _MarkPlayerZombie(_plr)
   
    if(ze_get_current_zombie_class(_plr) == gClass_BansheeID) {
            _MarkPlayerHasBats(_plr)
            _MarkPlayerBanshee(_plr)
    }
   
    if(_IsPlayerInTrouble(_plr)) {
        if(task_exists(TASK_BAT_FLY)) {
            remove_task(TASK_BAT_FLY)
        }
        if(task_exists(TASK_HOOK_HUMAN)) {
            remove_task(TASK_HOOK_HUMAN)
        }
       
        if(is_valid_ent(gEntity)) {
            remove_entity(gEntity)
        }
    }
}
 
public ze_user_humanized(plr) {
    _ClearPlayerZombie(plr)
    _ClearPlayerBanshee(plr)
}
 
public _FW_Player_Killed(victim, attacker, shouldgib) {
    if (_IsPlayerConnected(victim)) {
        _ClearPlayerAlive(victim)
        _ClearPlayerBanshee(victim)
       
        if(_IsPlayerBanshee(victim)) {
            if(_IsPlayerZombie(victim)) {
                entity_set_int(victim, EV_INT_sequence, random_num(128, 137))
            }
        }
        _ClearPlayerZombie(victim)
    }
}
 
public _Event_NewRound(id) {
    _bitPlayer[HasBats] = 0
   
    if(task_exists(TASK_BAT_FLY)) {
        remove_task(TASK_BAT_FLY)
    }
    if(task_exists(TASK_HOOK_HUMAN)) {
        remove_task(TASK_HOOK_HUMAN)
    }
    if(task_exists(id+TASK_THROW_BAT)) {
        remove_task(id+TASK_THROW_BAT)
    }
    if(task_exists(id+TASK_COOLDOWN)) {
        remove_task(id+TASK_COOLDOWN)
    }
       
    remove_entity(gEntity)
    _bitPlayer[InTrouble] = 0
}
 
public _THrow_Bats(plr) {
    if(fm_get_entity_flags(plr) & FL_ONGROUND)
        return
   
    if(_IsPlayerAlive(plr) && _IsPlayerZombie(plr) && _IsPlayerBanshee(plr)) {
        if(_IsPlayerHasBats(plr)) {
            new _Body
                ,_Target
            get_user_aiming(plr, _Target, _Body, 99999)
           
            if(_Target && is_valid_ent(_Target)) {
                g_Bat_Mode[plr] = 1
                g_Target[plr] = _Target
                _MarkPlayerInTrouble(_Target)
               
                _Create_Bets(plr)
               
                static bat_array[2]
               
                bat_array[0] = gEntity
                bat_array[1] = g_Target[plr]
               
                set_task(0.1, "_Set_BatFly", TASK_BAT_FLY, bat_array, sizeof(bat_array), "b")
                set_task(get_pcvar_float(pCvar[_RemoveBet_Time]), "_Remove_Bats", _Target+TASK_THROW_BAT)
            } else {
                g_Bat_Mode[plr] = 2
               
                _Create_Bets(plr)
               
                new Float:Velocity1[3]
                VelocityByAim(plr, 700, Velocity1)
               
                entity_set_vector(gEntity, EV_VEC_velocity, Velocity1)
            }
            set_task(get_pcvar_float(pCvar[_Cooldown]), "_Remove_Cooldown", plr+TASK_COOLDOWN)
        }
    }
}
 
public _Set_BatFly(bat_array[], taskid) {
    static _Target
    _Target = bat_array[1]
   
    new owner
   
    if(is_valid_ent(gEntity))
        owner = entity_get_edict(gEntity,EV_ENT_owner)
                           
    if(_IsPlayerAlive(owner))
    {
        _Set_Hook(_Target, gEntity)
    } else {
        if(task_exists(TASK_BAT_FLY)) remove_task(TASK_BAT_FLY)
        if(task_exists(TASK_HOOK_HUMAN)) remove_task(TASK_HOOK_HUMAN)
       
        remove_entity(gEntity)
    }
}
 
public _SetGrab_player(graber, grabed) {
    new array2[2]
    array2[0] = graber
    array2[1] = grabed
   
    set_task(0.1, "_SetGrab_player2", TASK_HOOK_HUMAN, array2, sizeof(array2), "b")
}
 
public _SetGrab_player2(array2[], taskid) {
    static id
    static target
   
    id = array2[0]
    target = array2[1]
   
    _Set_Hook(id, target)
    entity_set_int(gEntity, EV_INT_solid, SOLID_NOT)
}
 
public _Set_Hook(hooker, hooked) {
    static Float:originF[3]
   
    new Float:fl_Velocity[3];
    new Float:vicOrigin[3]
    new Float:distance = get_distance_f(originF, vicOrigin);
   
    entity_get_vector(hooker , EV_VEC_origin , originF );
    entity_get_vector(hooked , EV_VEC_origin , vicOrigin );
 
    if (distance > 1.0) {
        new Float:fl_Time = distance / get_pcvar_float(pCvar[_Hook_speed])
 
        fl_Velocity[0] = (originF[0] - vicOrigin[0]) / fl_Time
        fl_Velocity[1] = (originF[1] - vicOrigin[1]) / fl_Time
        fl_Velocity[2] = (originF[2] - vicOrigin[2]) / fl_Time
    } else {
        fl_Velocity[0] = 0.0
        fl_Velocity[1] = 0.0
        fl_Velocity[2] = 0.0
    }
 
    entity_set_vector(hooked, EV_VEC_velocity, fl_Velocity);
}
 
public _Create_Bets(owner) {
    gEntity = create_entity("info_target")
   
    new Float:Origin[3], Float:Angle[3]
   
    entity_get_vector(owner, EV_VEC_v_angle, Angle)
    entity_get_vector(owner, EV_VEC_origin, Origin)
    entity_set_origin(gEntity, Origin)
   
    entity_set_string(gEntity,EV_SZ_classname, _ENT_ClaSS);
    entity_set_model(gEntity, _BAT_ModEL)
    entity_set_int(gEntity,EV_INT_solid, 2)
    entity_set_int(gEntity, EV_INT_movetype, 5)
   
    entity_set_vector(gEntity, EV_VEC_angles, Angle)
   
    entity_set_byte(gEntity,EV_BYTE_controller1,125);
    entity_set_byte(gEntity,EV_BYTE_controller2,125);
    entity_set_byte(gEntity,EV_BYTE_controller3,125);
    entity_set_byte(gEntity,EV_BYTE_controller4,125);
   
    new Float:maxs[3] = {10.0,10.0,15.0}
    new Float:mins[3] = {-10.0,-10.0,-15.0}
    entity_set_size(gEntity,mins,maxs)
   
    entity_set_edict(gEntity, EV_ENT_owner, owner)
   
    entity_set_float(gEntity,EV_FL_animtime,2.0)
    entity_set_float(gEntity,EV_FL_framerate,1.0)
    entity_set_int(gEntity,EV_INT_sequence, 0)
}
 
public _FW_Touch(ent, touched) {
    new owner = entity_get_edict(gEntity,EV_ENT_owner)
    new id = g_Target[owner]
       
    if(g_Bat_Mode[owner] == 1 && ~_IsPlayerInTrouble(id) && ~_IsPlayerZombie(id)) {
       
        _MarkPlayerInTrouble(id)
        _SetGrab_player(owner, id)
    } else if(g_Bat_Mode[owner] == 2 && ~_IsPlayerInTrouble(touched)) {
        if(_IsPlayerAlive(touched) && ~_IsPlayerZombie(touched)) {
            _SetGrab_player(owner, touched)
            _MarkPlayerInTrouble(touched)
           
            static bat_array[2]
            bat_array[0] = ent
            bat_array[1] = touched
       
            set_task(0.1, "_Set_BatFly", TASK_BAT_FLY, bat_array, sizeof(bat_array), "b")
        } else {
            new Float:Origin[3]
            entity_get_vector(ent, EV_VEC_origin, Origin)
 
            message_begin(MSG_BROADCAST ,SVC_TEMPENTITY)
            write_byte(3)
            engfunc(EngFunc_WriteCoord, Origin[0])
            engfunc(EngFunc_WriteCoord, Origin[1])
            engfunc(EngFunc_WriteCoord, Origin[2])
            write_short(gExplosion_Spr)
            write_byte(25)
            write_byte(30)
            write_byte(0)
            message_end()
           
            remove_entity(ent)
        }
    }
}
 
public _FW_Player_Touch(ptr, ptd) {
    if(!is_valid_ent(ptr) || !is_valid_ent(ptd))
        return FMRES_IGNORED
       
    if(~_IsPlayerAlive(ptr) || ~_IsPlayerAlive(ptd) || ~_IsPlayerZombie(ptr) || _IsPlayerZombie(ptd))
        return FMRES_IGNORED
       
    if(_IsPlayerInTrouble(ptd) && g_Bat_Mode[ptr] == 1) {
        remove_task(TASK_BAT_FLY)
        remove_task(TASK_HOOK_HUMAN)
        remove_task(TASK_THROW_BAT)
       
        remove_entity(gEntity)
        _ClearPlayerInTrouble(ptd)
    } else if(_IsPlayerInTrouble(ptd) && g_Bat_Mode[ptr] == 1) {
        remove_task(TASK_BAT_FLY)
        remove_task(TASK_HOOK_HUMAN)
        remove_task(TASK_THROW_BAT)
       
        remove_entity(gEntity)
        _ClearPlayerInTrouble(ptd)
    }
    return FMRES_HANDLED
}
 
public remove_bat(taskid) {
    new id = taskid - TASK_THROW_BAT
   
    if(task_exists(TASK_BAT_FLY)) remove_task(TASK_BAT_FLY)
    if(task_exists(TASK_HOOK_HUMAN)) remove_task(TASK_HOOK_HUMAN)
    if(task_exists(id+TASK_THROW_BAT)) remove_task(id+TASK_THROW_BAT)
       
    if(is_valid_ent(gEntity)) {
        remove_entity(gEntity)
    }
       
    _ClearPlayerInTrouble(id)
}
 
public remove_cooldown(taskid) {
    new id = taskid - TASK_COOLDOWN
   
    if(_IsPlayerAlive(id) && _IsPlayerZombie(id) && _IsPlayerBanshee(id)) {
        ze_colored_print(id, "!tNow you can drop bat!y, !tPress !y(!gF!y)")
        _MarkPlayerHasBats(id)
    }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang10266\\ f0\\ fs16 \n\\ par }
*/
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1036{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/
I trynna make money, not friends.

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 633
Joined: 2 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 19
Contact:

#2

Post by Spir0x » 9 Months Ago

up
I trynna make money, not friends.

Rain1153
Senior Member
Senior Member
India
Posts: 277
Joined: 1 Year Ago
Has thanked: 2 times
Been thanked: 1 time
Age: 18
Contact:

#3

Post by Rain1153 » 9 Months Ago

its the plugin's fault.
LOL

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 633
Joined: 2 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 19
Contact:

#4

Post by Spir0x » 9 Months Ago

and how i can fix it ? impossible to be fixed ?
I trynna make money, not friends.

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 633
Joined: 2 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 19
Contact:

#5

Post by Spir0x » 9 Months Ago

up
I trynna make money, not friends.

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 633
Joined: 2 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 19
Contact:

#6

Post by Spir0x » 8 Months Ago

Up
I trynna make money, not friends.

User avatar
Mohamed Alaa
Mod Developer
Mod Developer
Egypt
Posts: 609
Joined: 2 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 48 times
Age: 19
Contact:

#7

Post by Mohamed Alaa » 8 Months Ago

Still don't understand what you mean by nothing happens when you try to choose it.

[ Post made via Android ]
Want your own mod edition? PM me.
Accepting web projects.

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 633
Joined: 2 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 19
Contact:

#8

Post by Spir0x » 8 Months Ago

dude when i click 1. Classic zombie works fine also when i click 2. Gravity zombie works fine. but when i choose 5. Banshee Zombie [VIP] no thing happens ever.
I trynna make money, not friends.

User avatar
Muhammet20
Veteran Member
Veteran Member
Syria
Posts: 391
Joined: 1 Year Ago
Location: Turkey
Has thanked: 36 times
Been thanked: 5 times
Age: 13
Contact:

#9

Post by Muhammet20 » 8 Months Ago

Spir0x wrote:
9 Months Ago
Hey all please help me to fix this banshee zombie class when i click 5. Banshee Zombie nothing happen ! i want to run it.

Code: Select all

#include <zombie_escape>
#include <ze_zombies_class>
#include <ze_vip>
#include < engine >
 
#define _PLUGIN     "[ZP] Zombie Class: Banshee Zombie"
#define _VERSION                  "1.1"
#define _AUTHOR                "H.RED.ZONE"
 
#define VIP_FLAGS VIP_A
 
#define _MarkPlayerConnected(%0)  _bitPlayer[Connected] |= (1 << (%0 & 31))
#define _ClearPlayerConnected(%0) _bitPlayer[Connected] &= ~(1 << (%0 & 31))
#define _IsPlayerConnected(%0)    _bitPlayer[Connected] & (1 << (%0 & 31))
 
#define _MarkPlayerAlive(%0)  _bitPlayer[Alive] |= (1 << (%0 & 31))
#define _ClearPlayerAlive(%0) _bitPlayer[Alive] &= ~(1 << (%0 & 31))
#define _IsPlayerAlive(%0)    _bitPlayer[Alive] & (1 << (%0 & 31))
 
#define _MarkPlayerZombie(%0)  _bitPlayer[Zombie] |= (1 << (%0 & 31))
#define _ClearPlayerZombie(%0) _bitPlayer[Zombie] &= ~(1 << (%0 & 31))
#define _IsPlayerZombie(%0)    _bitPlayer[Zombie] & (1 << (%0 & 31))
 
#define _MarkPlayerBanshee(%0)  _bitPlayer[Banshee] |= (1 << (%0 & 31))
#define _ClearPlayerBanshee(%0) _bitPlayer[Banshee] &= ~(1 << (%0 & 31))
#define _IsPlayerBanshee(%0)    _bitPlayer[Banshee] & (1 << (%0 & 31))
 
#define _MarkPlayerHasBats(%0)  _bitPlayer[HasBats] |= (1 << (%0 & 31))
#define _ClearPlayerHasBats(%0) _bitPlayer[HasBats] &= ~(1 << (%0 & 31))
#define _IsPlayerHasBats(%0)    _bitPlayer[HasBats] & (1 << (%0 & 31))
 
#define _MarkPlayerInTrouble(%0)  _bitPlayer[InTrouble] |= (1 << (%0 & 31))
#define _ClearPlayerInTrouble(%0) _bitPlayer[InTrouble] &= ~(1 << (%0 & 31))
#define _IsPlayerInTrouble(%0)    _bitPlayer[InTrouble] & (1 << (%0 & 31))
 
#define fm_get_entity_flags(%1)    pev(%1, pev_flags)
 
enum _Bits {
    HasBats,
    InTrouble,
    Alive,
    Connected,
    Zombie,
    Banshee
}
 
new _bitPlayer[_Bits]
 
new const zclass_name[] = "Banshee Zombie"
new const zclass_info[] = "Press F"
const zclass_health = 50000
const zclass_speed = 350
const zclass_gravity = 600
 
new const _BAT_ModEL[] = "models/Premuim_ZE/bat_witch.mdl"
new const _ENT_ClaSS[] = "bat_witch"
 
enum (+= 110) {
    TASK_BAT_FLY,
    TASK_HOOK_HUMAN,
    TASK_THROW_BAT,
    TASK_COOLDOWN
}
 
enum _Cvar {
    _Cooldown,
    _RemoveBet_Time,
    _Hook_speed
}
 
new pCvar [_Cvar]
 
new gClass_BansheeID
new gExplosion_Spr
new gEntity
 
new g_Bat_Mode[33]
new g_Target[33]
 
public plugin_init() {
    register_plugin(_PLUGIN, _VERSION, _AUTHOR)
   
    register_impulse(100, "_THrow_Bats")
    register_touch(_ENT_ClaSS, "*", "_FW_Touch")
    register_event("HLTV", "_Event_NewRound", "1=0", "2=0")
   
    RegisterHam(Ham_Killed, "player", "_FW_Player_Killed", 1)
    RegisterHam(Ham_Spawn, "player", "_FW_Player_Spawn", 1 );
    RegisterHam(Ham_Touch, "player", "_FW_Player_Touch", 0)
   
    pCvar[_Cooldown] = register_cvar("ze_banshee_cooldown","30.0")
    pCvar[_RemoveBet_Time] = register_cvar("ze_banshee_time_removebat","10.0")
    pCvar[_Hook_speed] = register_cvar("ze_banshee_hook_speed","320.0")
}
 
public plugin_precache() {
    gClass_BansheeID = ze_register_zombie_class(zclass_name, zclass_info, zclass_health, zclass_speed, zclass_gravity)
 
    gExplosion_Spr = precache_model("sprites/zerogxplode.spr")
    precache_model(_BAT_ModEL)
}
 
public client_connect(plr) {
    _MarkPlayerConnected(plr)
}
 
public client_disconnected(plr) {
    _ClearPlayerConnected(plr)
}
 
public _FW_Player_Spawn(plr) {
    if(_IsPlayerConnected(plr)) {
        _MarkPlayerAlive(plr)
    }
}
 
public ze_select_zombie_class_pre(id, classid)
{
    if (classid != gClass_BansheeID)
        return ZE_CLASS_AVAILABLE
 
    if (~(ze_get_vip_flags(id) & VIP_FLAGS))
        return ZE_CLASS_UNAVAILABLE
 
    ze_add_zombie_class_menu_text("\y[\rVIP\y]")
 
    return ZE_CLASS_AVAILABLE
}
 
public ze_select_zombie_class_post(id, classid)
{
    if (classid != gClass_BansheeID)
        return
 
    ze_set_next_zombie_class(id, gClass_BansheeID)
}
 
public ze_user_infected(_plr) {
    _MarkPlayerZombie(_plr)
   
    if(ze_get_current_zombie_class(_plr) == gClass_BansheeID) {
            _MarkPlayerHasBats(_plr)
            _MarkPlayerBanshee(_plr)
    }
   
    if(_IsPlayerInTrouble(_plr)) {
        if(task_exists(TASK_BAT_FLY)) {
            remove_task(TASK_BAT_FLY)
        }
        if(task_exists(TASK_HOOK_HUMAN)) {
            remove_task(TASK_HOOK_HUMAN)
        }
       
        if(is_valid_ent(gEntity)) {
            remove_entity(gEntity)
        }
    }
}
 
public ze_user_humanized(plr) {
    _ClearPlayerZombie(plr)
    _ClearPlayerBanshee(plr)
}
 
public _FW_Player_Killed(victim, attacker, shouldgib) {
    if (_IsPlayerConnected(victim)) {
        _ClearPlayerAlive(victim)
        _ClearPlayerBanshee(victim)
       
        if(_IsPlayerBanshee(victim)) {
            if(_IsPlayerZombie(victim)) {
                entity_set_int(victim, EV_INT_sequence, random_num(128, 137))
            }
        }
        _ClearPlayerZombie(victim)
    }
}
 
public _Event_NewRound(id) {
    _bitPlayer[HasBats] = 0
   
    if(task_exists(TASK_BAT_FLY)) {
        remove_task(TASK_BAT_FLY)
    }
    if(task_exists(TASK_HOOK_HUMAN)) {
        remove_task(TASK_HOOK_HUMAN)
    }
    if(task_exists(id+TASK_THROW_BAT)) {
        remove_task(id+TASK_THROW_BAT)
    }
    if(task_exists(id+TASK_COOLDOWN)) {
        remove_task(id+TASK_COOLDOWN)
    }
       
    remove_entity(gEntity)
    _bitPlayer[InTrouble] = 0
}
 
public _THrow_Bats(plr) {
    if(fm_get_entity_flags(plr) & FL_ONGROUND)
        return
   
    if(_IsPlayerAlive(plr) && _IsPlayerZombie(plr) && _IsPlayerBanshee(plr)) {
        if(_IsPlayerHasBats(plr)) {
            new _Body
                ,_Target
            get_user_aiming(plr, _Target, _Body, 99999)
           
            if(_Target && is_valid_ent(_Target)) {
                g_Bat_Mode[plr] = 1
                g_Target[plr] = _Target
                _MarkPlayerInTrouble(_Target)
               
                _Create_Bets(plr)
               
                static bat_array[2]
               
                bat_array[0] = gEntity
                bat_array[1] = g_Target[plr]
               
                set_task(0.1, "_Set_BatFly", TASK_BAT_FLY, bat_array, sizeof(bat_array), "b")
                set_task(get_pcvar_float(pCvar[_RemoveBet_Time]), "_Remove_Bats", _Target+TASK_THROW_BAT)
            } else {
                g_Bat_Mode[plr] = 2
               
                _Create_Bets(plr)
               
                new Float:Velocity1[3]
                VelocityByAim(plr, 700, Velocity1)
               
                entity_set_vector(gEntity, EV_VEC_velocity, Velocity1)
            }
            set_task(get_pcvar_float(pCvar[_Cooldown]), "_Remove_Cooldown", plr+TASK_COOLDOWN)
        }
    }
}
 
public _Set_BatFly(bat_array[], taskid) {
    static _Target
    _Target = bat_array[1]
   
    new owner
   
    if(is_valid_ent(gEntity))
        owner = entity_get_edict(gEntity,EV_ENT_owner)
                           
    if(_IsPlayerAlive(owner))
    {
        _Set_Hook(_Target, gEntity)
    } else {
        if(task_exists(TASK_BAT_FLY)) remove_task(TASK_BAT_FLY)
        if(task_exists(TASK_HOOK_HUMAN)) remove_task(TASK_HOOK_HUMAN)
       
        remove_entity(gEntity)
    }
}
 
public _SetGrab_player(graber, grabed) {
    new array2[2]
    array2[0] = graber
    array2[1] = grabed
   
    set_task(0.1, "_SetGrab_player2", TASK_HOOK_HUMAN, array2, sizeof(array2), "b")
}
 
public _SetGrab_player2(array2[], taskid) {
    static id
    static target
   
    id = array2[0]
    target = array2[1]
   
    _Set_Hook(id, target)
    entity_set_int(gEntity, EV_INT_solid, SOLID_NOT)
}
 
public _Set_Hook(hooker, hooked) {
    static Float:originF[3]
   
    new Float:fl_Velocity[3];
    new Float:vicOrigin[3]
    new Float:distance = get_distance_f(originF, vicOrigin);
   
    entity_get_vector(hooker , EV_VEC_origin , originF );
    entity_get_vector(hooked , EV_VEC_origin , vicOrigin );
 
    if (distance > 1.0) {
        new Float:fl_Time = distance / get_pcvar_float(pCvar[_Hook_speed])
 
        fl_Velocity[0] = (originF[0] - vicOrigin[0]) / fl_Time
        fl_Velocity[1] = (originF[1] - vicOrigin[1]) / fl_Time
        fl_Velocity[2] = (originF[2] - vicOrigin[2]) / fl_Time
    } else {
        fl_Velocity[0] = 0.0
        fl_Velocity[1] = 0.0
        fl_Velocity[2] = 0.0
    }
 
    entity_set_vector(hooked, EV_VEC_velocity, fl_Velocity);
}
 
public _Create_Bets(owner) {
    gEntity = create_entity("info_target")
   
    new Float:Origin[3], Float:Angle[3]
   
    entity_get_vector(owner, EV_VEC_v_angle, Angle)
    entity_get_vector(owner, EV_VEC_origin, Origin)
    entity_set_origin(gEntity, Origin)
   
    entity_set_string(gEntity,EV_SZ_classname, _ENT_ClaSS);
    entity_set_model(gEntity, _BAT_ModEL)
    entity_set_int(gEntity,EV_INT_solid, 2)
    entity_set_int(gEntity, EV_INT_movetype, 5)
   
    entity_set_vector(gEntity, EV_VEC_angles, Angle)
   
    entity_set_byte(gEntity,EV_BYTE_controller1,125);
    entity_set_byte(gEntity,EV_BYTE_controller2,125);
    entity_set_byte(gEntity,EV_BYTE_controller3,125);
    entity_set_byte(gEntity,EV_BYTE_controller4,125);
   
    new Float:maxs[3] = {10.0,10.0,15.0}
    new Float:mins[3] = {-10.0,-10.0,-15.0}
    entity_set_size(gEntity,mins,maxs)
   
    entity_set_edict(gEntity, EV_ENT_owner, owner)
   
    entity_set_float(gEntity,EV_FL_animtime,2.0)
    entity_set_float(gEntity,EV_FL_framerate,1.0)
    entity_set_int(gEntity,EV_INT_sequence, 0)
}
 
public _FW_Touch(ent, touched) {
    new owner = entity_get_edict(gEntity,EV_ENT_owner)
    new id = g_Target[owner]
       
    if(g_Bat_Mode[owner] == 1 && ~_IsPlayerInTrouble(id) && ~_IsPlayerZombie(id)) {
       
        _MarkPlayerInTrouble(id)
        _SetGrab_player(owner, id)
    } else if(g_Bat_Mode[owner] == 2 && ~_IsPlayerInTrouble(touched)) {
        if(_IsPlayerAlive(touched) && ~_IsPlayerZombie(touched)) {
            _SetGrab_player(owner, touched)
            _MarkPlayerInTrouble(touched)
           
            static bat_array[2]
            bat_array[0] = ent
            bat_array[1] = touched
       
            set_task(0.1, "_Set_BatFly", TASK_BAT_FLY, bat_array, sizeof(bat_array), "b")
        } else {
            new Float:Origin[3]
            entity_get_vector(ent, EV_VEC_origin, Origin)
 
            message_begin(MSG_BROADCAST ,SVC_TEMPENTITY)
            write_byte(3)
            engfunc(EngFunc_WriteCoord, Origin[0])
            engfunc(EngFunc_WriteCoord, Origin[1])
            engfunc(EngFunc_WriteCoord, Origin[2])
            write_short(gExplosion_Spr)
            write_byte(25)
            write_byte(30)
            write_byte(0)
            message_end()
           
            remove_entity(ent)
        }
    }
}
 
public _FW_Player_Touch(ptr, ptd) {
    if(!is_valid_ent(ptr) || !is_valid_ent(ptd))
        return FMRES_IGNORED
       
    if(~_IsPlayerAlive(ptr) || ~_IsPlayerAlive(ptd) || ~_IsPlayerZombie(ptr) || _IsPlayerZombie(ptd))
        return FMRES_IGNORED
       
    if(_IsPlayerInTrouble(ptd) && g_Bat_Mode[ptr] == 1) {
        remove_task(TASK_BAT_FLY)
        remove_task(TASK_HOOK_HUMAN)
        remove_task(TASK_THROW_BAT)
       
        remove_entity(gEntity)
        _ClearPlayerInTrouble(ptd)
    } else if(_IsPlayerInTrouble(ptd) && g_Bat_Mode[ptr] == 1) {
        remove_task(TASK_BAT_FLY)
        remove_task(TASK_HOOK_HUMAN)
        remove_task(TASK_THROW_BAT)
       
        remove_entity(gEntity)
        _ClearPlayerInTrouble(ptd)
    }
    return FMRES_HANDLED
}
 
public remove_bat(taskid) {
    new id = taskid - TASK_THROW_BAT
   
    if(task_exists(TASK_BAT_FLY)) remove_task(TASK_BAT_FLY)
    if(task_exists(TASK_HOOK_HUMAN)) remove_task(TASK_HOOK_HUMAN)
    if(task_exists(id+TASK_THROW_BAT)) remove_task(id+TASK_THROW_BAT)
       
    if(is_valid_ent(gEntity)) {
        remove_entity(gEntity)
    }
       
    _ClearPlayerInTrouble(id)
}
 
public remove_cooldown(taskid) {
    new id = taskid - TASK_COOLDOWN
   
    if(_IsPlayerAlive(id) && _IsPlayerZombie(id) && _IsPlayerBanshee(id)) {
        ze_colored_print(id, "!tNow you can drop bat!y, !tPress !y(!gF!y)")
        _MarkPlayerHasBats(id)
    }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang10266\\ f0\\ fs16 \n\\ par }
*/
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1036{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/
hi man
now i understand your problem
but do you sure if you are VIP when you are testing this plugin ?
if you are not make yourself VIP and try again
if the problem stiil say to me
i will try to help you
and for the class
i making a zombie class menu plugin
and its will be ready to day or tommorow
so , i will be glad if you fix your problem
now i saying have a nice day
.::Kaya Gaming || Never Give Up || Zombie Escape::. [Server is Under The Work]
https://kaya-gaming.ga/

I just believe in two things, First thing is who i see in the mirror, second thing is who i don't see in the sky.

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 633
Joined: 2 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 19
Contact:

#10

Post by Spir0x » 8 Months Ago

Yes bro i tested it with vip and without vip too. it won't work.
I trynna make money, not friends.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest