Raised This Month: $ Target: $400
 0% 

Block the amx_teleport & amx_cvar sv_maxvelocity script


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
grkmkprl
Junior Member
Join Date: Sep 2017
Old 12-23-2017 , 06:59   Block the amx_teleport & amx_cvar sv_maxvelocity script
Reply With Quote #1

Hello to everyone,I have a problem.I want to block the amx_teleport and amx_cvar sv_maxvelocity command on my server.ie it is possible to block amx commands?,i want to ask this.Do not ask why I just need it.Please help.
grkmkprl is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-23-2017 , 07:22   Re: Block the amx_teleport & amx_cvar sv_maxvelocity script
Reply With Quote #2

Why? It is possible.
__________________

Last edited by HamletEagle; 12-23-2017 at 07:22.
HamletEagle is offline
grkmkprl
Junior Member
Join Date: Sep 2017
Old 12-23-2017 , 07:44   Re: Block the amx_teleport & amx_cvar sv_maxvelocity script
Reply With Quote #3

Quote:
Originally Posted by HamletEagle View Post
Why? It is possible.

I own a bhop server.There is a partner on the server,we pay the money together.He gave his friends admin.And they are constantly doing it with teleport bug and I want velocity to be 2 thousand but they are doing higher.I can not say anything to them.And I want to block these commands,I hope you understand .I really need it.
grkmkprl is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-23-2017 , 08:03   Re: Block the amx_teleport & amx_cvar sv_maxvelocity script
Reply With Quote #4

amx_teleport does not seem to be a default command, so just find the plugin that adds this command and remove it.
For amx_cvar, attach your admincmd.sma here.
__________________
HamletEagle is offline
grkmkprl
Junior Member
Join Date: Sep 2017
Old 12-23-2017 , 08:08   Re: Block the amx_teleport & amx_cvar sv_maxvelocity script
Reply With Quote #5

Quote:
Originally Posted by HamletEagle View Post
amx_teleport does not seem to be a default command, so just find the plugin that adds this command and remove it.
For amx_cvar, attach your admincmd.sma here.
But there is a problem,the server host does not allow this.So need a script.
grkmkprl is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-23-2017 , 08:31   Re: Block the amx_teleport & amx_cvar sv_maxvelocity script
Reply With Quote #6

If you can add plugins, you can remove them.
__________________
HamletEagle is offline
TheWhitesmith
Senior Member
Join Date: Oct 2017
Location: Morocco :c
Old 12-23-2017 , 11:48   Re: Block the amx_teleport & amx_cvar sv_maxvelocity script
Reply With Quote #7

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define DEFVALUE 2000.0 //REMEMBER, FLOAT HERE

new pCvarMV

public plugin_init() {
    
pCvarMV get_cvar_pointer("sv_maxvelocity")
    
set_task(5.0"check_maxvelocitycvar"0__"b")
}

public 
check_maxvelocitycvar(taskid) {
    if(
get_pcvar_float(pCvarMV) != DEFVALUE)
        
set_pcvar_float(pCvarMVDEFVALUE)

Would be better if you check cvarname entered and return it if it's the one you want to block rather than using the plugin I attached, but I expect this to work.
__________________
TheWhitesmith is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-23-2017 , 14:16   Re: Block the amx_teleport & amx_cvar sv_maxvelocity script
Reply With Quote #8

Who's to say that the other "co-owner" won't just undo your changes? When you implement this, he or she will wonder what is wrong . . . You should probably just talk to him or her.
__________________

Last edited by fysiks; 12-23-2017 at 14:17.
fysiks is offline
grkmkprl
Junior Member
Join Date: Sep 2017
Old 12-24-2017 , 03:05   Re: Block the amx_teleport & amx_cvar sv_maxvelocity script
Reply With Quote #9

Quote:
Originally Posted by TheWhitesmith View Post
PHP Code:
#include <amxmodx>
#include <amxmisc>

#define DEFVALUE 2000.0 //REMEMBER, FLOAT HERE

new pCvarMV

public plugin_init() {
    
pCvarMV get_cvar_pointer("sv_maxvelocity")
    
set_task(5.0"check_maxvelocitycvar"0__"b")
}

public 
check_maxvelocitycvar(taskid) {
    if(
get_pcvar_float(pCvarMV) != DEFVALUE)
        
set_pcvar_float(pCvarMVDEFVALUE)

Would be better if you check cvarname entered and return it if it's the one you want to block rather than using the plugin I attached, but I expect this to work.

Thanks a lot.It works fine.How can we disable the telemenu plugin.The server host does not allow me to access plugins.Could you find a solution,please.
grkmkprl is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-24-2017 , 05:00   Re: Block the amx_teleport & amx_cvar sv_maxvelocity script
Reply With Quote #10

Quote:
Originally Posted by grkmkprl View Post
Thanks a lot.It works fine.How can we disable the telemenu plugin.The server host does not allow me to access plugins.Could you find a solution,please.
Again, if you can add plugins to plugins.ini, you can remove too. Put ; in front of the plugin.
It's not hard to understand.
__________________
HamletEagle is offline
Reply



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 20:41.


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