AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Name change event (https://forums.alliedmods.net/showthread.php?t=57255)

xion 07-01-2007 12:01

Name change event
 
Is there an event for when someone changed their name? I looked on the Wiki but no luck. I tried registering the clcmd name, but also no luck:

PHP Code:

register_clcmd("name""makeLoginBar"0

How can i do it?

Ta,
Mitcb

mateo10 07-01-2007 12:11

Re: Name change event
 
I think you can use client_infochanged(id), but I'm not sure.

Alka 07-01-2007 14:48

Re: Name change event
 
@matte - You'r right! :wink:

Code:

public client_infochanged(id)
{
 if(!is_user_connected(id))
  return 0;
 
 new newname[32], oldname[32]
 
 get_user_name(id, oldname, 31)
 get_user_info(id, "name", newname, 31)
 
 if(!equali(newname,oldname))
 {
      //do stuffs when change name
 }
}



All times are GMT -4. The time now is 21:23.

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