Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <fakemeta>
  3. #include <amxmisc>
  4.  
  5. #define VERSION "0.1.0"
  6.  
  7. public plugin_init()
  8. {
  9. register_plugin("One Name", VERSION, "ConnorMcLeod")
  10. register_forward(FM_ClientUserInfoChanged, "ClientUserInfoChanged")
  11. }
  12.  
  13. public ClientUserInfoChanged(id)
  14. {
  15. static const name[] = "name"
  16. static szOldName[32], szNewName[32]
  17. pev(id, pev_netname, szOldName, charsmax(szOldName))
  18. if( szOldName[0] )
  19. {
  20. get_user_info(id, name, szNewName, charsmax(szNewName))
  21. if( !equal(szOldName, szNewName) )
  22. {
  23. set_user_info(id, name, szOldName)
  24. return FMRES_HANDLED
  25. }
  26. }
  27. return FMRES_IGNORED
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement