AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Dont work. Why (https://forums.alliedmods.net/showthread.php?t=188915)

Artifact 07-01-2012 16:48

Dont work. Why
 
PHP Code:

#include <amxmodx>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "good."

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("cl_forwardspeed""Cao")
    
register_clcmd("cl_backspeed""Cao")
}

public 
Cao(id)
{
    new 
steamID[32]
    
get_user_authid(idsteamID31)
    
console_print(id"Ne smes koristiti komande cl_forwardspeed i cl_backspeed na ovom serveru")
    
server_cmd("kick ^"%d^" ^"Chack your console^"")
}

public 
client_connect(id)
{
    
client_cmd(id"cl_forwardspeed 400")
    
client_cmd(id"cl_forwardspeed 400")



fysiks 07-01-2012 16:59

Re: Dont work. Why
 
Seriously you ask for help on this? You should know better. Also, you can't register cvars as commands.

Artifact 07-01-2012 17:07

Re: Dont work. Why
 
I dont know that :) Sorry :p
But how I can block cl_forwardspeed and cl_backspeed commands?

ConnorMcLeod 07-01-2012 17:09

Re: Dont work. Why
 
What is your problem with those cvars ?

Artifact 07-01-2012 18:57

Re: Dont work. Why
 
Nothing, just to block :p But I dont know how...
I dont want to block permanently, just for my server :)

hornet 07-01-2012 19:49

Re: Dont work. Why
 
You don't need to, they're maxed by sv_maxspeed.

fysiks 07-01-2012 21:24

Re: Dont work. Why
 
Quote:

Originally Posted by Artifact (Post 1740649)
But how I can block cl_forwardspeed and cl_backspeed commands?

They aren't commands and therefore you can't block them as such.

DjOptimuS 07-01-2012 23:38

Re: Dont work. Why
 
http://elxdraco.net/scripting/cvarlist/

Check the link here.

Look & Read the sv_* cvars. You can lock up many client cvars by setting certain values on the server cvars. No need for an aditional plugin.

ConnorMcLeod 07-02-2012 04:23

Re: Dont work. Why
 
Quote:

Sets the speed using the forward key (+forward). This is limited by sv_maxspeed server side. And in CS this is limited by the per weapon speed.This should be equal to cl_backspeed and cl_sidespeed or you will have problem holding forward and left at the same time for example.
So, asking again, why do you want to block those cvars ?

Artifact 07-02-2012 15:03

Re: Dont work. Why
 
Quote:

Originally Posted by ConnorMcLeod (Post 1741004)
So, asking again, why do you want to block those cvars ?

Just to know how to do that and for fun...


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

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