Raised This Month: $ Target: $400
 0% 

Slowing Down Players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LordDeath
Member
Join Date: Feb 2019
Old 08-10-2019 , 19:30   Slowing Down Players
Reply With Quote #1

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 is offline
Old 08-10-2019, 19:49
thEsp
This message has been deleted by thEsp.
LordDeath
Member
Join Date: Feb 2019
Old 08-11-2019 , 03:15   Re: Slowing Down Players
Reply With Quote #3

Quote:
Originally Posted by thEsp View Post
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.
LordDeath is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-11-2019 , 03:31   Re: Slowing Down Players
Reply With Quote #4

You don't have to use pev_velocity, use pev_maxspeed.
https://forums.alliedmods.net/showpo...2&postcount=11
__________________
edon1337 is offline
Old 08-11-2019, 04:16
thEsp
This message has been deleted by asherkin.
Old 08-11-2019, 04:24
LordDeath
This message has been deleted by asherkin.
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-11-2019 , 04:27   Re: Slowing Down Players
Reply With Quote #7

Quote:
Originally Posted by LordDeath View Post
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.
__________________
edon1337 is offline
LordDeath
Member
Join Date: Feb 2019
Old 08-11-2019 , 04:31   Re: Slowing Down Players
Reply With Quote #8

Quote:
Originally Posted by edon1337 View Post
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
LordDeath is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-11-2019 , 04:57   Re: Slowing Down Players
Reply With Quote #9

Quote:
Originally Posted by LordDeath View Post
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?
__________________
edon1337 is offline
Old 08-11-2019, 04:26
thEsp
This message has been deleted by asherkin.
Reply


Thread Tools
Display Modes

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 Jump


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


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