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

remplace player command


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 10-14-2018 , 11:40   remplace player command
Reply With Quote #1

hello, is there any plugin that change what a player says?
i mean, if a player says /top15, the server will change that to /toppoints or smth else.
or if a player says /rank, /rankstats, to switch automaticaly to /points
like swear remplacement, but it doesnt work the way i want
i searched but didnt found
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 10-14-2018 , 13:32   Re: remplace player command
Reply With Quote #2

Quote:
Originally Posted by Nutu_ View Post
hello, is there any plugin that change what a player says?
i mean, if a player says /top15, the server will change that to /toppoints or smth else.
or if a player says /rank, /rankstats, to switch automaticaly to /points
like swear remplacement, but it doesnt work the way i want
i searched but didnt found
well a simple solution would be editing statsx plugin and remove those /top15 /rank and /rankstats command, or change them, then you are free to set them in your other plugin, like this:

PHP Code:
    register_clcmd("say /points""show_teampoints");
    
register_clcmd("say /rank""show_teampoints");
    
register_clcmd("say /rankstats""show_teampoints");
    
register_clcmd("say /top15""show_top");
    
register_clcmd("say /toppoints""show_top"); 
this is simple solution, if you don't know how to do this, post your plugin that you are using and the version of your amxmodx so we know what statx to edit!

Last edited by tarsisd2; 10-14-2018 at 13:34.
tarsisd2 is offline
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 10-14-2018 , 15:01   Re: remplace player command
Reply With Quote #3

works perfectly, thank you !
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
D4rkSiD3Rs
Senior Member
Join Date: Jan 2018
Location: Morocco
Old 10-14-2018 , 16:11   Re: remplace player command
Reply With Quote #4

place it before your ranking plugin in plugins.ini or remove it.

PHP Code:
#include <amxmodx>

public plugin_init()
{
     
register_clcmd("say /top15""showtoppoints");
     
register_clcmd("say /rank""showpoints");
     
register_clcmd("say /rankstats""showpoints");
}

public 
showtoppoints(id)
{
     
client_cmd(id"say /toppoints");
     return 
PLUGIN_HANDLED;
}

public 
showpoints(id)
{
     
client_cmd(id"say /points");
     return 
PLUGIN_HANDLED;

__________________


D4rkSiD3Rs is offline
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 10-14-2018 , 16:23   Re: remplace player command
Reply With Quote #5

i dont have to,
I've removed rankstats, top15, and rank from statsx and i've used register_clcmd in points plugin for top15, rankstats, rank, and it works
__________________
a simple act of caring creates an endless ripple.
Nutu_ 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 14:14.


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