Raised This Month: $ Target: $400
 0% 

Name Changer Notify Help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 


Thread Tools
Display Modes

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