Lock players.
Hello peeps, I want to make an plugin which stops users/players for moving (For obvious reasons). And this is code Im using, It compiles but doesn't work as expected.
Code:
public LockPlayer(id)Edit: I searched for "cs_maxspeed_api" (as idea of CrazY.) and included it on plugin. But the compiler returns an error "fatal error 100: cannot read from file: "cs_maxspeed_api_const" but I added Code:
#include <cs_maxspeed_api> |
Re: Lock players.
cs_maxspeed_api
|
Re: Lock players.
Quote:
|
Re: Lock players.
It's an API of Zombie Plague 5.0. You got the error because it's a third party plugin, it's not included in default amxx package.
Download the zp_plugin_50.zip, compile the cs_maxspeed_api and enable it in plugins.ini. After that, include the cs_maxspeed_api in your plugin and set user max speed to 1.0 (cs_set_player_maxspeed(player, 1.0)). You should call it only once, not in client_PreThink. https://forums.alliedmods.net/showthread.php?t=72505 |
Re: Lock players.
Quote:
Is it not working according to you why? Because when you switch to another weapon your speed resets? In that case you need to do for example this: Code:
And then block reset speed (RG_CBasePlayer_ResetMaxSpeed for example in ReAPI) checking if the player has speed: Code:
|
Re: Lock players.
Only change max speed won't affect anything if you don't call reset_maxspeed.
|
Re: Lock players.
Change max_speed + block resetmaxspeed. That's all.
|
Re: Lock players.
I've used the FL_FROZEN method before and it works well.
|
Re: Lock players.
Quote:
|
| All times are GMT -4. The time now is 07:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.