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.