Thread: [Solved] Bots to use a parachute
View Single Post
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 12-22-2020 , 19:08   Re: Bots to use a parachute
Reply With Quote #8

Quote:
Originally Posted by ivani6651 View Post
Counter-Strike plugin.

YAPB Bots ----> https://yapb.ru/

I will use it for zombie plague 4.3 mod, but so far I have not had crashes, because the bots themselves do not have the option to use a parachute.
Code:
/*𝓼𝓹𝓲𝓷𝔁*/ #include <amxmodx> #include <engine> #include <fakemeta> #include <fun> #define PLUGIN "Auto Null Parachute" #define VERSION "0.1" #define AUTHOR "SPiNX" #define MAX_AUTHID_LENGTH          64 #define MAX_IP_LENGTH              16 new pAutoDeploy, pFallSpeed, pParaModel, g_model; public plugin_init() {    register_plugin(PLUGIN, VERSION, AUTHOR);    pFallSpeed  = register_cvar("parachute_fallspeed", "100");    pAutoDeploy = register_cvar("parachute_autorip", "200");    pParaModel  = register_cvar("parachute_model", "1"); } public plugin_precache()    g_model = precache_model("sprites/steam1.spr"); public client_PreThink(id) {    if (is_user_connecting(id) || !is_user_connected(id) || !is_user_alive(id))       return;    else    {        new Rip_Cord = get_pcvar_num(pAutoDeploy);        new AUTO;        AUTO = (pev(id,pev_flFallVelocity) >= (get_pcvar_num(pFallSpeed) + Rip_Cord) );        new Float:fallspeed = get_pcvar_float(pFallSpeed) * -1.0        new button = get_user_button(id), oldbutton = get_user_oldbutton(id), flags = get_entity_flags(id);        if(flags & FL_ONGROUND)        {           if (get_user_gravity(id) == 0.1)              set_user_gravity(id, 1.0)           return        }        if(button & IN_USE|AUTO)        {           new Float:velocity[3]           entity_get_vector(id, EV_VEC_velocity, velocity)           set_user_gravity(id, 0.1)           velocity[2] = (velocity[2] + 40.0 < fallspeed) ? velocity[2] + 40.0 : fallspeed           if(get_pcvar_num(pParaModel))           {               entity_set_vector(id, EV_VEC_velocity, velocity)               emessage_begin( MSG_PVS, SVC_TEMPENTITY, { 0, 0, 0 }, 0 );               ewrite_byte(TE_PLAYERATTACHMENT)               ewrite_byte(id)               ewrite_coord(-MAX_AUTHID_LENGTH)               ewrite_short(g_model)               ewrite_short(MAX_IP_LENGTH) //life               emessage_end();           }        }        else if (oldbutton & IN_USE)           set_user_gravity(id, 1.0);     } }

Automatic null chute for both humans and bots. Custom waypoints were required for AI to jump down with Ping Of Death Bots.
__________________

Last edited by DJEarthQuake; 12-22-2020 at 21:06. Reason: Hover on a cloud model CVAR.
DJEarthQuake is offline