Raised This Month: $ Target: $400
 0% 

Name Changer Notify Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Akhil
Junior Member
Join Date: Jan 2009
Old 01-17-2009 , 01:43   Name Changer Notify Help
Reply With Quote #1

Hi guys i'm making a plugin which helps to identify the player whos changing the server's name.Ive made plugin by looking at parts of other plugins' source
Forget Optimising the plugin isnt even working.
I dont know whats the problem.
Plzz help me
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>

#define PLUGIN "Name Change Detector"
#define VERSION "1.0"
#define AUTHOR "Akhil"

// constants
new const NAME_ADMIN = ADMIN_ALL

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR);
    
    // command to detect name change
    register_clcmd("cmd", "nameChange");
}

public nameChange(id)
{
    if(get_user_flags(id)==NAME_ADMIN)
    return PLUGIN_HANDLED;
    
    new command[5]; 
    
    read_argv(1, command, 4); //read command from the user
    
    if(equali(command, "name")) // whether given command after cmd is name?
    {
        set_hudmessage(255, 127, 42, 0.5, -1.0, 0, 6.0, 7.0);
        show_hudmessage(0, "%s has changed the name And he's a Big Noob", id);
        show_hudmessage(0, "%s YOU WEAK PATHETIC FOOL!!!!!", id);
    }
    return PLUGIN_HANDLED;
}
This is the code
And it would help if i could add a sound that would play when it prints the message on the hud
like you are a noob.
So plzz help how to play a custom sound at that time.

Last edited by Akhil; 01-17-2009 at 03:53. Reason: Want Xtras
Akhil is offline
Akhil
Junior Member
Join Date: Jan 2009
Old 01-17-2009 , 05:43   Re: Name Changer Notify Help
Reply With Quote #2

I think the command is not even registering.
I tried a lot of things clcmd concmd and also removed the flags thingy
still no use
has the clcmd have any restrictions on the commands to be used

PLz help
Akhil is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-17-2009 , 06:02   Re: Name Changer Notify Help
Reply With Quote #3

Ye, the name command isn't sent to server. Still you are allowed to get user name with get_user_name, so just figure out something else with it.
SnoW is offline
Send a message via MSN to SnoW
GoGoGo
Senior Member
Join Date: Apr 2008
Old 01-17-2009 , 06:27   Re: Name Changer Notify Help
Reply With Quote #4

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define msc "misc/noob.wav"

#define PLUGIN "Name Change Detector"
#define VERSION "1.0"
#define AUTHOR "Akhil"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);

}

public  
client_infochanged id 
{
    if(
get_user_flagsid ) == ADMIN_ALL)
    return 
PLUGIN_HANDLED

    new 
name[32]
    
get_user_name (idname31)
    
set_hudmessage(255127420.5, -1.006.07.0);
    
show_hudmessage(0"%s has changed the name And he's a Big Noob"namename); // what a stupid plugin : ( 
    
client_print(id,print_chat,"%s YOU WEAK PATHETIC FOOL!!!!!",name)
    
    
//read about hud's channels if you don't want to print @UP message to player :)
    
    
client_cmd(id,"spk %s"msc)
    
    return 
PLUGIN_HANDLED;
}
public 
plugin_precache()
{
    
precache_soundmsc )    

And don't bump topics (!)
__________________
Aaaaaa!
GoGoGo is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-17-2009 , 07:07   Re: Name Changer Notify Help
Reply With Quote #5

Why don't you run a dedicated server instead of a listenserver ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Akhil
Junior Member
Join Date: Jan 2009
Old 01-17-2009 , 14:07   Re: Name Changer Notify Help
Reply With Quote #6

Quote:
Originally Posted by SnoW View Post
Ye, the name command isn't sent to server. Still you are allowed to get user name with get_user_name, so just figure out something else with it.
Even I tried to change my name with that cmd name command but still its not working. And i tried it after removing the cmd_access part.At least my command would reach the server no?

Quote:
Originally Posted by GoGoGo View Post
// what a stupid plugin : (
And don't bump topics (!)
I dont think u got my point friend.
I want to detect the player who is trying to change name of the server(admin)
and not his own
and i think thats what ur program does
Correct me if I am wrong

And i am really sorry if I am being a noob for making useless topics but i had seen some1 request for a plugin like this thats why i attempted it.

@Connor
My dedicated server always lags and many times not even visible in server list
And also it would me nice to catch the culprit red handed

$gogogo

I tested ur plugin and it detect name change of only himself.
It doesnt detect if a plyer is changing admin's name.
And also the sounds and hud message comes twice
once after loading map and once after entering a team in case of ur plugin.


PS: i want the sound to play to every1

Last edited by Akhil; 01-18-2009 at 12:36. Reason: extra things
Akhil is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-19-2009 , 02:21   Re: Name Changer Notify Help
Reply With Quote #7

Are you wanting to find a registered admin that is changing the server's name? Or are you looking for someone that shouldn't have this access?

I think if you turn on logging you can look through the logs and find if someone with admin is changing it via amxmodx. Probably with: "amx_cvar hostname newservername".

Or, if this is being done maliciously through rcon I suggest you change your rcon password.
fysiks is offline
Akhil
Junior Member
Join Date: Jan 2009
Old 01-19-2009 , 03:37   Re: Name Changer Notify Help
Reply With Quote #8

Quote:
Originally Posted by fysiks View Post
I think if you turn on logging you can look through the logs and find if someone with admin is changing it via amxmodx. Probably with: "amx_cvar hostname newservername".
I am the only admin of my server.

Quote:
Originally Posted by fysiks View Post
Or, if this is being done maliciously through rcon I suggest you change your rcon password.
Ya not actually mliciously. I am running a a listen server and not HLDS
so the players can change my name with a command
cmd name <Req. name>.
This is exactly what i want to catch
Akhil is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-20-2009 , 16:31   Re: Name Changer Notify Help
Reply With Quote #9

Quote:
Originally Posted by Akhil View Post
. . . so the players can change my name with a command
cmd name <Req. name>.
This is exactly what i want to catch
You speak of someone changing your player name here but before you say someone changes the server's name? Which one is it?

As far as I know, another can't change your player name without admin regardless of it being a listen server. For that matter, you can't change the server's name without admin anyways.
fysiks is offline
GoGoGo
Senior Member
Join Date: Apr 2008
Old 01-17-2009 , 09:14   Re: Name Changer Notify Help
Reply With Quote #10

Conor are you asking me?

Listen is faster to turn on.
__________________
Aaaaaa!
GoGoGo 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 01:54.


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