Rules FAQ Members List Search Register Login

 Raised This Month: \$275 Target: \$400 68%

 Thread Tools Display Modes
Author Message
marcelowzd
Member
Join Date: Feb 2011
Location: São Paulo, Brazil
 07-11-2018 , 17:35   Make BunnyHop faster (In-game, not code) #1 Hello guys, i'm trying to make the old bunnyhop enabler make the player go faster than it does currently. PHP Code: ``` #include #include #define    FL_WATERJUMP    (1<<11)    // player jumping out of water#define    FL_ONGROUND    (1<<9)    // At rest / on the groundpublic plugin_init(){    register_plugin("Super Bunny Hopper", "1.2", "Cheesy Peteza")}public client_PreThink(id) {    entity_set_float(id, EV_FL_fuser2, 0.0);    if (entity_get_int(id, EV_INT_button) & 2)     {        new flags = entity_get_int(id, EV_INT_flags);        if (flags & FL_WATERJUMP)            return PLUGIN_CONTINUE;                    if (entity_get_int(id, EV_INT_waterlevel) >= 2)            return PLUGIN_CONTINUE;                    if (!(flags & FL_ONGROUND))            return PLUGIN_CONTINUE;        new Float:velocity[3];                entity_get_vector(id, EV_VEC_velocity, velocity);        velocity[2] += 250.0;                /* I wrote this - This kind of works, but sometimes it just throws the player to one side or another        if( velocity[ 1 ] > velocity[ 0 ] )            velocity[ 1 ] += ( velocity[ 1 ] > 0 ? 500 : -500 )        else            velocity[ 0 ] += ( velocity[ 0 ] > 0 ? 500 : -500 )                */        new Float:fVelocity = vector_length( velocity ); // This is the formula according to this https://forums.alliedmods.net/showthread.php?t=91474        //new fSpeed = floatsqroot(floatpower(velocity[0], 2.0) + floatpower(velocity[1], 2.0)) // This is the code used in KZ Plugins        console_print( id, "%f", fVelocity ); // Just debug to know at what speed i'm        // VelocityByAim doesn't do what i need                entity_set_vector(id, EV_VEC_velocity, velocity);        entity_set_int(id, EV_INT_gaitsequence, 6);    }        return PLUGIN_CONTINUE;}  ``` I want to make it give speed faster. What i wrote does that, but sometimes it just throws the player to one side or another. I don't understand angles and such things in half-life so i'm pretty sure i'm doing things wrong. I tried VelocityByAim which gives velocity, but the player can't jump after the first jump anymore. What am i missing? __________________ Last edited by marcelowzd; 07-11-2018 at 17:50.
lazarev
Veteran Member
Join Date: Sep 2008
 07-11-2018 , 18:46   Re: Make BunnyHop faster (In-game, not code) #2 PHP Code: ``` new Float:velocity[3];entity_get_vector(id, EV_VEC_velocity, velocity);new Float:dir[3];xs_vec_copy(velocity, dir);dir[2] = 0.0;xs_vec_normalize(dir, dir);xs_vec_mul_scalar(dir, 250.0, dir);xs_vec_add(velocity, dir, velocity);velocity[2] = 250.0;  ```
marcelowzd
Member
Join Date: Feb 2011
Location: São Paulo, Brazil
07-11-2018 , 19:56   Re: Make BunnyHop faster (In-game, not code)
#3

Quote:
 Originally Posted by lazarev PHP Code: ``` new Float:velocity[3]; entity_get_vector(id, EV_VEC_velocity, velocity); new Float:dir[3]; xs_vec_copy(velocity, dir); dir[2] = 0.0; xs_vec_normalize(dir, dir); xs_vec_mul_scalar(dir, 250.0, dir); xs_vec_add(velocity, dir, velocity); velocity[2] = 250.0;  ```
So, i was missing a lot of things, huh?
Thanks, it is perfect.
__________________
JocAnis
Senior Member
Join Date: Jun 2010
 07-12-2018 , 11:52   Re: Make BunnyHop faster (In-game, not code) #4 @juice, is his code good alternative for using as axn for axn maps on kz servers? cuz admins are saying classical lan axn module can cause problems on online servers
lazarev
Veteran Member
Join Date: Sep 2008
07-12-2018 , 20:41   Re: Make BunnyHop faster (In-game, not code)
#5

Quote:
 Originally Posted by JocAnis @juice, is his code good alternative for using as axn for axn maps on kz servers? cuz admins are saying classical lan axn module can cause problems on online servers

 I don't want to go off-topic in this thread, can we discuss this through PM?

Last edited by lazarev; 07-12-2018 at 20:41.
JocAnis
Senior Member
Join Date: Jun 2010
 07-13-2018 , 11:40   Re: Make BunnyHop faster (In-game, not code) #6 yep, pm

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Server Discussion     Source Servers (SRCDS)     HL1 Servers (HLDS) AMX Mod X     News     Bug Reports     General     Off-Topic     Plugins         Suggestions / Requests         Approved Plugins         New Plugin Submissions         Unapproved/Old Plugins         Translation Request         High-Traffic Plugins             GunGame             UAIO (Ultimate All-In-One Plugin)             xREDIRECT             CSDM             AMX Super             RuneMod             Zombie Plague Mod             SuperHero Mod                 News                 Tech Support                 Scripting Help                 Off-Topic / General Chat                 Heroes                     Suggestions / Requests                     Approved Heroes                     New Submissions                     Unapproved/Old Heroes                         Module Heroes                     SuperHero Mod Stats - By 123                 (OLD) Bug Reports     Scripting         Scripting Help         Code Snippets/Tutorials         Module Coding     Donor Access SourceMod     News     General     Plugins         Plugins         Unapproved Plugins         Plugin/Gameplay Ideas and Requests         High-Traffic Plugins             SourceMod Anti-Cheat             Zombie:Reloaded             SourceBans             VSH / Freak Fortress             Store             SM_Hosties             HLstatsX:CE     Scripting     Extensions     Snippets and Tutorials     Donor Access     Metamod: Source         Metamod:Source Plugins         Metamod:Source Questions         Coding MM:S Plugins & SM Extensions Hosted Stuff     Asherkin's Plugins         TF2Items         TFDodgeball         SteamTools     Bail's Plugins         CSDM         CS:S DM Off-Topic & Trash     Off-Topic     Trash

All times are GMT -4. The time now is 02:00.

 DMCA - Archive - Top