AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   get if player changed name (https://forums.alliedmods.net/showthread.php?t=131060)

D1ma 06-30-2010 16:11

get if player changed name
 
I have this code:
Code:

public plugin_init() {
    register_plugin("Ban IP In Name","1.0","D[i]Ma/NickName3")
    register_clcmd("name", "name_change")
}
public name_change(id, level, cid) {
    read_args(g_allArgs, 1023)
    strtolower(g_allArgs)
    remove_quotes(g_allArgs)
    log_amx("User changed name to ^"%s^"",g_allArgs)
    return PLUGIN_CONTINUE
}

but the public name_change is not callled
What is the problem here?
Thanks.

fysiks 06-30-2010 16:23

Re: get if player changed name
 
Quote:

Originally Posted by D1ma (Post 1224872)
I have this code:
Code:

public plugin_init() {
    register_plugin("Ban IP In Name","1.0","D[i]Ma/NickName3")
    register_clcmd("name", "name_change")
}
public name_change(id, level, cid) {
    read_args(g_allArgs, 1023)
    strtolower(g_allArgs)
    remove_quotes(g_allArgs)
    log_amx("User changed name to ^"%s^"",g_allArgs)
    return PLUGIN_CONTINUE
}

but the public name_change is not callled
What is the problem here?
Thanks.

The "name" command is not sent to the server. You have to use client_infochanged() or similar. Search for other plugins that check the name.

D1ma 06-30-2010 17:18

Re: get if player changed name
 
ok thanks.


All times are GMT -4. The time now is 14:49.

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