Raised This Month: $32 Target: $400
 8% 

Problem with player maxspeed


Post New Thread Reply   
 
Thread Tools Display Modes
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 07-30-2015 , 11:13   Re: Problem with player maxspeed
Reply With Quote #21

GetSpeed with DHook should work; the extension is hooking the Get function, which you can override the returned value. See the example in the extension examples.
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work

Last edited by RedSword; 07-30-2015 at 11:14.
RedSword is offline
Jcrr
Senior Member
Join Date: Jul 2015
Old 07-30-2015 , 12:51   Re: Problem with player maxspeed
Reply With Quote #22

Ok, ill try this, and report effects
Jcrr is offline
Jcrr
Senior Member
Join Date: Jul 2015
Old 07-31-2015 , 09:09   Re: Problem with player maxspeed
Reply With Quote #23

Ok, i did it this way, its completly workaround, and it looks little silly but its working
PHP Code:
public "when somthing occured ex player spawn"
{
    
CreateTimer(0.5slowGetClientUserId("CLIENT, VICTIM, USERID ETC"), TIMER_REPEAT);

AAAAAnd the timer itself:
PHP Code:
public Action:slow(Handle:timerany:userid)
{
    new 
client GetClientOfUserId(userid);
    
SetEntPropFloat(clientProp_Send"m_flVelocityModifier"0.6)

It works like someone is still hitting ground after falling and is slowed to 0.6 hes normal speed.

Bonus, the console spam:
Spoiler


Someone know how to get rid of theese messages??

Last edited by Jcrr; 07-31-2015 at 09:10.
Jcrr is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 07-31-2015 , 10:10   Re: Problem with player maxspeed
Reply With Quote #24

Return if client == 0
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work
RedSword is offline
Jcrr
Senior Member
Join Date: Jul 2015
Old 07-31-2015 , 10:36   Re: Problem with player maxspeed
Reply With Quote #25

PHP Code:
public Action:slow(Handle:timerany:userid)
{
    new 
client GetClientOfUserId(userid);
    
SetEntPropFloat(clientProp_Send"m_flVelocityModifier"0.6)

    if(
client[client] == 0)
    {
        return 
Plugin_Continue;
    } 

Like that?

Last edited by Jcrr; 07-31-2015 at 10:36. Reason: forgot )
Jcrr is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 07-31-2015 , 10:38   Re: Problem with player maxspeed
Reply With Quote #26

... no, your SetEntProp causes the error, hence the check should be done before... also wtf, client isn't an array...
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work
RedSword is offline
Jcrr
Senior Member
Join Date: Jul 2015
Old 07-31-2015 , 10:47   Re: Problem with player maxspeed
Reply With Quote #27

PHP Code:
public Action:slow(Handle:timerany:userid)
{
    new 
client GetClientOfUserId(userid);
    if(
XXX != 0)
    {
        
SetEntPropFloat(clientProp_Send"m_flVelocityModifier"0.6)
    }

Ok, it should be like this, but what i need to put as XXX?
Jcrr is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 07-31-2015 , 10:57   Re: Problem with player maxspeed
Reply With Quote #28

The client variable?

What Red meant to say is DO NOT run the netprop function if the client id is 0.
Potato Uno is offline
NatsUpX
Junior Member
Join Date: Jun 2022
Old 06-17-2022 , 08:29   Re: Problem with player maxspeed
Reply With Quote #29

Hello,

i know this is an old thread but can someone create a plugin where running with a knife is faster than usual?

i want to set the speeds on my own

The ones in this thread are not working for me, not sure what im doing wrong.

Kind Regards,
Natsu
NatsUpX is offline
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 18:48.


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