AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Slowing Down Players (https://forums.alliedmods.net/showthread.php?t=318048)

LordDeath 08-10-2019 19:30

Slowing Down Players
 
I want to slow the down the players, in other words, to force them to remain under 400. (SGS users)
I ended up getting them to stop instead of slowing down a bit, what's wrong in the code?
I assume this is the part which is done wrong, but I have no clue what I should do.
HTML Code:

set_pev(id, pev_velocity, speed);
Full code :
HTML Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fakemeta_util>
//#include <zp50_grenade_frost>  ;Not used yet

#define PLUGIN "Sgs Limiter"
#define VERSION "1.0"
#define AUTHOR "Death"


public plugin_init() {
        register_plugin(PLUGIN, VERSION, AUTHOR)
        register_forward(FM_CmdStart, "fw_Start")
}

public fw_Start(id, uc_handle, seed)
{
    new button = get_uc(uc_handle,UC_Buttons)   
    if((button & IN_DUCK))
        check_speed(id)


public check_speed(id)
{
        new Float:speed[3];
        pev(id, pev_velocity, speed);
        if(speed[2] > 400 || speed[1] > 400 || speed[0] > 400)
        {
        set_pev(id, pev_velocity, speed);
        //set_pev(id, pev_velocity, speed - 10);
        }
}


LordDeath 08-11-2019 03:15

Re: Slowing Down Players
 
Quote:

Originally Posted by thEsp (Post 2662831)
Code:
#include <amxmodx> #include <fakemeta_util> #include <hamsandwich> /* Choose your own desired values. */ new const WantedButton = IN_DUCK; new const Float:MaxSpeed = 100.0; new const Weapon = CSW_AK47; public plugin_init() {     register_forward(FM_CmdStart, "fwCmdStart_pre"); } public fwCmdStart_pre(id) {     if(get_user_weapon(id) == Weapon && (pev(id, pev_button) & WantedButton))     {         fm_set_user_maxspeed(id, MaxSpeed);     }     else if(get_user_weapon(id) == Weapon && !(pev(id, pev_button) & WantedButton))     {         ExecuteHamB(Ham_CS_Player_ResetMaxSpeed, id);     } }
Try this, I wrote it accordingly to what you said...

This is not even going to work at all, the players gain insane speed by doing GS/SGS even if the maxspeed is limited to 100/200/... (People can go up to 700~). they can still go higher. so I manually need to lower their speed down.

edon1337 08-11-2019 03:31

Re: Slowing Down Players
 
You don't have to use pev_velocity, use pev_maxspeed.
https://forums.alliedmods.net/showpo...2&postcount=11

edon1337 08-11-2019 04:27

Re: Slowing Down Players
 
Quote:

Originally Posted by LordDeath (Post 2662854)
I'm not sure what you helped with, I've said in my reply that the maxspeed is a meme to those people with 300~ FPS. what you did isn't even going to work at all

What does FPS have to do with maxspeed?

Use pev_maxspeed instead of pev_velocity as I mentioned above.

LordDeath 08-11-2019 04:31

Re: Slowing Down Players
 
Quote:

Originally Posted by edon1337 (Post 2662857)
What does FPS have to do with maxspeed?

Use pev_maxspeed instead of pev_velocity as I mentioned above.

In cs 1.6 there is something called "SGS / Stand up ground strafe" or "GS / Ground Strafe" to achieve this you need to have +100~ FPS. doing this gives you extra speed, it's done by ducking (spamming +duck and strafing") people with above 300~ usually get to speeds above 400~ even they can reach 700s. with people having gaming pcs those days getting high fps isn't hard.
this is how it looks https://www.youtube.com/watch?v=tphEaTd9KrY

edon1337 08-11-2019 04:57

Re: Slowing Down Players
 
Quote:

Originally Posted by LordDeath (Post 2662858)
In cs 1.6 there is something called "SGS / Stand up ground strafe" or "GS / Ground Strafe" to achieve this you need to have +100~ FPS. doing this gives you extra speed, it's done by ducking (spamming +duck and strafing") people with above 300~ usually get to speeds above 400~ even they can reach 700s. with people having gaming pcs those days getting high fps isn't hard.
this is how it looks https://www.youtube.com/watch?v=tphEaTd9KrY

I'm sure players with FPS lower than 100 can do that too, FPS only matters visually, not physically.
Did you try pev_maxspeed?

LordDeath 08-11-2019 04:59

Re: Slowing Down Players
 
Quote:

Originally Posted by edon1337 (Post 2662860)
I'm sure players with FPS lower than 100 can do that too, FPS only matters visually, not physically.
Did you try pev_maxspeed?

You need to spam the +duck way fast. you can't do it with lower than 100 FPS.
I'm testing it atm, I'll reply back later on

edon1337 08-11-2019 05:06

Re: Slowing Down Players
 
Quote:

Originally Posted by LordDeath (Post 2662861)
you can't do it with lower than 100 FPS.

Quote:

Originally Posted by edon1337 (Post 2662860)
I'm sure players with FPS lower than 100 can do that too, FPS only matters visually, not physically.

Set fps_max to 60 and try it.

CrazY. 08-11-2019 10:19

Re: Slowing Down Players
 
Not really, only players with high fps can do that.
@OP you may try this https://forums.alliedmods.net/showthread.php?t=54964

edon1337 08-11-2019 11:21

Re: Slowing Down Players
 
Quote:

Originally Posted by CrazY. (Post 2662898)
Not really, only players with high fps can do that.

Quote:

Originally Posted by edon1337 (Post 2662860)
I'm sure players with FPS lower than 100 can do that too, FPS only matters visually, not physically.

Unless you prove me otherwise.


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

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