AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Keep Player Name (https://forums.alliedmods.net/showthread.php?t=330014)

Teamkiller324 01-16-2021 20:54

[ANY] Keep Player Name
 
[ANY] Keep Player Name

Description
Stores the clients player name via mysql/sqlite cookie storage.
If the clients name is already stored, it wont be replaced. This plugin also blocks namechange overall.

Features
1. Translation Support. Currently has English, Swedish, Spanish & Hungarian (Needs to be updated.)
2. Cookie Storage Support. (Saves clients preferred settings in mysql/sqlite.)

Commands
1. sm_forcename - Force name on a client
2. sm_clearname - Clear out the stored name for the client (client gets a new stored name once he reconnects.) (Only works when you don't have a forced name. ATM)

Plans
1. Add true MySQL support as replacement to cookie storage. (will happen soon.) Planned on 2.0.0 (Soon Finished)
2. Update the sm_clearname to clear everything. Planned on 2.0.0 (Finished)

Changelog
Quote:


Version 1.1.5
+ Updated the translation phrase lines
+ Updated code to simply change chat tag when compiling yourself
+ Updated clearname function to check if the target has a forced name or not

Version 1.1.4
+ Updated syntax regarding cookies
+ Updated code
+ Added Hungarian translation (Thanks to Ladis92/KasperH)

Version 1.1.3
+ Fixed sm_clearname not clearing out the name in the cookie storage (my bad, how did i miss this?)
+ Updated translations

Version 1.1.2
+ Enabled OnClientSettingsChanged and fixed its function error

Version 1.1.1
+ Fixed crash
+ Fixed cookies not functioning properly
- Disabled OnClientSettingsChanged function temporarily due to not functioning correctly atm

Version 1.1.0
+ Fixed Error Spam and quite some other issues.
+ Updated sm_forcename (sm_forcename to reset your stored forced name, sm_forcename <#userid|target name> to reset someone elses name>
+ Updated sm_clearname (sm_clearname to reset your stored name, sm_clearname <#userid|target name> to reset someone elses name>
- Removed sm_removeforcename as it were useless
+ Name change events should be suppressed completely now (Taken from Suppress Manager)

Version 1.0.1
+ Added sm_forcename command to force a name on a client
+ Added sm_removeforcename command to remove the forced name on a client
+ Added sm_clearname to clear out the stored player name in the storage (client gets new name stored once reconnected)
+ Added Translation support

Version 1.0.0
+ Release


GitHub Repository | Latest Version

Spyrek 01-19-2021 10:11

Re: [ANY] Keep Player Name [Updated 17-01-2021] Version 1.0.0
 
Does the event "player_changename" works in CSGO?

Ilusion9 01-19-2021 11:04

Re: [ANY] Keep Player Name [Updated 17-01-2021] Version 1.0.0
 
return Plugin_Handled in player_changename event doesn't block the name change. You must check the client name in OnClientSettingsChanged() and you should block the message in SayText2 usermessage.

Quote:

Originally Posted by Spyrek (Post 2733256)
Does the event "player_changename" works in CSGO?

yes, but there are cheats which doesn't trigger the event. OnClientSettingsChanged is the safest way.

Lannister 01-20-2021 15:11

Re: [ANY] Keep Player Name [Updated 17-01-2021] Version 1.0.0
 
Hello!

Thanks for the plugin! i was wondering if it's possible to FORCE a permanente nickname on a player, for example, sm_forcename "Lannister" "Targaryen"

So this mean that everytime i join the server, my nickname will automatically change from "Lannister" to "Targaryen" and also it will prevent me to change it back.

This will be useful for people that enters with the same account but different nickname to prevent admins from recognize them


Thanks!

Teamkiller324 01-21-2021 19:54

Re: [ANY] Keep Player Name [Updated 17-01-2021] Version 1.0.0
 
Quote:

Originally Posted by Lannister (Post 2733442)
Hello!

Thanks for the plugin! i was wondering if it's possible to FORCE a permanente nickname on a player, for example, sm_forcename "Lannister" "Targaryen"

So this mean that everytime i join the server, my nickname will automatically change from "Lannister" to "Targaryen" and also it will prevent me to change it back.

This will be useful for people that enters with the same account but different nickname to prevent admins from recognize them


Thanks!

Interesting concept, i'll try get onto that. Sounds like you just do sm_forcename <player> <newname> and probably store it in cookie storage. doesn't sound too hard to do.

Teamkiller324 01-21-2021 20:39

Re: [ANY] Keep Player Name [Updated 17-01-2021] Version 1.0.0
 
Quote:

Originally Posted by Lannister (Post 2733442)
Hello!

Thanks for the plugin! i was wondering if it's possible to FORCE a permanente nickname on a player, for example, sm_forcename "Lannister" "Targaryen"

So this mean that everytime i join the server, my nickname will automatically change from "Lannister" to "Targaryen" and also it will prevent me to change it back.

This will be useful for people that enters with the same account but different nickname to prevent admins from recognize them


Thanks!

Feature should be added now

Tonblader 01-22-2021 03:36

Re: [ANY] Keep Player Name [Updated 21-01-2021] Version 1.0.1
 
Quote:

Originally Posted by Teamkiller324 (Post 2733655)
Interesting concept, i'll try get onto that. Sounds like you just do sm_forcename <player> <newname> and probably store it in cookie storage. doesn't sound too hard to do.

sm_forcename <player> <newname> <--- in the value <newname> make it optional please, if blank, forcename the current name
In L4D2, this command not work properly, does not change the player's name to the name specified in the 2nd value (in mid-game).
The users can spam in chat the changename and need block "setinfo name" commands in console and with 3rd party plugins Example

Can you implement any of the ideas from these other plugins from amxmodx to sourcemod?
Mainly the One Name v3.0!

https://forums.alliedmods.net/showthread.php?t=18232 (1 name-locked per steamuserid)
https://forums.alliedmods.net/showthread.php?t=189096 (protect a nickname that can only be used by one user)
https://forums.alliedmods.net/showthread.php?t=17363 (protect a nickname that cannot be used by all players)
https://forums.alliedmods.net/showthread.php?t=90414 (protect change nickname spam)
https://forums.alliedmods.net/showthread.php?t=79596 (protect use ip or www nicknames spam)

Sandervraun 01-22-2021 05:06

Re: [ANY] Keep Player Name [Updated 21-01-2021] Version 1.0.1
 
Quote:

L 01/22/2021 - 11:04:17: [SM] [16] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [18] SetClientName
L 01/22/2021 - 11:04:17: [SM] [19] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [21] SetClientName
L 01/22/2021 - 11:04:17: [SM] [22] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [24] SetClientName
L 01/22/2021 - 11:04:17: [SM] [25] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [27] SetClientName
L 01/22/2021 - 11:04:17: [SM] [28] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [30] SetClientName
L 01/22/2021 - 11:04:17: [SM] [31] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [33] SetClientName
L 01/22/2021 - 11:04:17: [SM] [34] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [36] SetClientName
L 01/22/2021 - 11:04:17: [SM] [37] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [39] SetClientName
L 01/22/2021 - 11:04:17: [SM] [40] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [42] SetClientName
L 01/22/2021 - 11:04:17: [SM] [43] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [45] SetClientName
L 01/22/2021 - 11:04:17: [SM] [46] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [48] SetClientName
L 01/22/2021 - 11:04:17: [SM] [49] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [51] SetClientName
L 01/22/2021 - 11:04:17: [SM] [52] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [54] SetClientName
L 01/22/2021 - 11:04:17: [SM] [55] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [57] SetClientName
L 01/22/2021 - 11:04:17: [SM] [58] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [60] SetClientName
L 01/22/2021 - 11:04:17: [SM] [61] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [63] SetClientName
L 01/22/2021 - 11:04:17: [SM] [64] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [66] SetClientName
L 01/22/2021 - 11:04:17: [SM] [67] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [69] SetClientName
L 01/22/2021 - 11:04:17: [SM] [70] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [72] SetClientName
L 01/22/2021 - 11:04:17: [SM] [73] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [75] SetClientName
L 01/22/2021 - 11:04:17: [SM] [76] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [78] SetClientName
L 01/22/2021 - 11:04:17: [SM] [79] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [81] SetClientName
L 01/22/2021 - 11:04:17: [SM] [82] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [84] SetClientName
L 01/22/2021 - 11:04:17: [SM] [85] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [87] SetClientName
L 01/22/2021 - 11:04:17: [SM] [88] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [90] SetClientName
L 01/22/2021 - 11:04:17: [SM] [91] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [93] SetClientName
L 01/22/2021 - 11:04:17: [SM] [94] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [96] SetClientName
L 01/22/2021 - 11:04:17: [SM] [97] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [99] SetClientName
L 01/22/2021 - 11:04:17: [SM] [100] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [102] SetClientName
L 01/22/2021 - 11:04:17: [SM] [103] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [105] SetClientName
L 01/22/2021 - 11:04:17: [SM] [106] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [108] SetClientName
L 01/22/2021 - 11:04:17: [SM] [109] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [111] SetClientName
L 01/22/2021 - 11:04:17: [SM] [112] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [114] SetClientName
L 01/22/2021 - 11:04:17: [SM] [115] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [117] SetClientName
L 01/22/2021 - 11:04:17: [SM] [118] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [120] SetClientName
L 01/22/2021 - 11:04:17: [SM] [121] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [123] SetClientName
L 01/22/2021 - 11:04:17: [SM] [124] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [126] SetClientName
L 01/22/2021 - 11:04:17: [SM] [127] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [129] SetClientName
L 01/22/2021 - 11:04:17: [SM] [130] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [132] SetClientName
L 01/22/2021 - 11:04:17: [SM] [133] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:21: World triggered "Round_Start"

Teamkiller324 01-22-2021 21:02

Re: [ANY] Keep Player Name [Updated 23-01-2021] Version 1.1.0
 
Quote:

Originally Posted by Sandervraun
L 01/22/2021 - 11:04:17: [SM] [16] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [18] SetClientName
L 01/22/2021 - 11:04:17: [SM] [19] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [21] SetClientName
L 01/22/2021 - 11:04:17: [SM] [22] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [24] SetClientName
L 01/22/2021 - 11:04:17: [SM] [25] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [27] SetClientName
L 01/22/2021 - 11:04:17: [SM] [28] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [30] SetClientName
L 01/22/2021 - 11:04:17: [SM] [31] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [33] SetClientName
L 01/22/2021 - 11:04:17: [SM] [34] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [36] SetClientName
L 01/22/2021 - 11:04:17: [SM] [37] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [39] SetClientName
L 01/22/2021 - 11:04:17: [SM] [40] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [42] SetClientName
L 01/22/2021 - 11:04:17: [SM] [43] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [45] SetClientName
L 01/22/2021 - 11:04:17: [SM] [46] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [48] SetClientName
L 01/22/2021 - 11:04:17: [SM] [49] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [51] SetClientName
L 01/22/2021 - 11:04:17: [SM] [52] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [54] SetClientName
L 01/22/2021 - 11:04:17: [SM] [55] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [57] SetClientName
L 01/22/2021 - 11:04:17: [SM] [58] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [60] SetClientName
L 01/22/2021 - 11:04:17: [SM] [61] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [63] SetClientName
L 01/22/2021 - 11:04:17: [SM] [64] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [66] SetClientName
L 01/22/2021 - 11:04:17: [SM] [67] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [69] SetClientName
L 01/22/2021 - 11:04:17: [SM] [70] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [72] SetClientName
L 01/22/2021 - 11:04:17: [SM] [73] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [75] SetClientName
L 01/22/2021 - 11:04:17: [SM] [76] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [78] SetClientName
L 01/22/2021 - 11:04:17: [SM] [79] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [81] SetClientName
L 01/22/2021 - 11:04:17: [SM] [82] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [84] SetClientName
L 01/22/2021 - 11:04:17: [SM] [85] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [87] SetClientName
L 01/22/2021 - 11:04:17: [SM] [88] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [90] SetClientName
L 01/22/2021 - 11:04:17: [SM] [91] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [93] SetClientName
L 01/22/2021 - 11:04:17: [SM] [94] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [96] SetClientName
L 01/22/2021 - 11:04:17: [SM] [97] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [99] SetClientName
L 01/22/2021 - 11:04:17: [SM] [100] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [102] SetClientName
L 01/22/2021 - 11:04:17: [SM] [103] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [105] SetClientName
L 01/22/2021 - 11:04:17: [SM] [106] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [108] SetClientName
L 01/22/2021 - 11:04:17: [SM] [109] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [111] SetClientName
L 01/22/2021 - 11:04:17: [SM] [112] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [114] SetClientName
L 01/22/2021 - 11:04:17: [SM] [115] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [117] SetClientName
L 01/22/2021 - 11:04:17: [SM] [118] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [120] SetClientName
L 01/22/2021 - 11:04:17: [SM] [121] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [123] SetClientName
L 01/22/2021 - 11:04:17: [SM] [124] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [126] SetClientName
L 01/22/2021 - 11:04:17: [SM] [127] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [129] SetClientName
L 01/22/2021 - 11:04:17: [SM] [130] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:17: [SM] [132] SetClientName
L 01/22/2021 - 11:04:17: [SM] [133] Line 61, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::OnClientSettingsChanged
L 01/22/2021 - 11:04:21: World triggered "Round_Start"

Should be fixed

Tonblader 01-22-2021 22:35

Re: [ANY] Keep Player Name [Updated 23-01-2021] Version 1.1.0
 
Quote:

Originally Posted by Teamkiller324 (Post 2733812)
Should be fixed

In Left 4 Dead 2 Listen Server Windows, when i use sm_forcename Tonblader hola , my game crash, no errorlog.

Teamkiller324 01-23-2021 03:05

Re: [ANY] Keep Player Name [Updated 23-01-2021] Version 1.1.0
 
Quote:

Originally Posted by Tonblader (Post 2733819)
In Left 4 Dead 2 Listen Server Windows, when i use sm_forcename Tonblader hola , my game crash, no errorlog.

I have no Left 4 Dead 2 Server nor do i really play it so i can't really test on that game unfortunately :/

and using the plugin via client side server shouldn't be surprising you're crashing either

Tonblader 01-23-2021 03:41

Re: [ANY] Keep Player Name [Updated 23-01-2021] Version 1.1.0
 
Quote:

Originally Posted by Teamkiller324 (Post 2733850)
I have no Left 4 Dead 2 Server nor do i really play it so i can't really test on that game unfortunately :/

and using the plugin via client side server shouldn't be surprising you're crashing either

With the previous version of your plugin, it bugged and worked, but it didn't crash.

Teamkiller324 01-23-2021 04:51

Re: [ANY] Keep Player Name [Updated 23-01-2021] Version 1.1.0
 
Quote:

Originally Posted by Tonblader (Post 2733856)
With the previous version of your plugin, it bugged and worked, but it didn't crash.

It must be related to OnClientSettingsChanged since i fixed that problem, this plugin is problem free for me and have no issues.
Try use the plugin on a dedicated server instead than client server.

Edit:
Got a Left4Dead2 test server up and it instantly crashes when using forcename command and atm don't know exactly how to solve this problem but hopefully will come up with a solution soon.

Teamkiller324 01-23-2021 06:26

Re: [ANY] Keep Player Name [Updated 23-01-21] Version 1.1.1
 
The new 1.1.1 should fix the crash issue and cookies not functioning correctly as i somehow messed that part up lol, my bad

OnClientSettingsChanged function is not working properly and just spams errors instead and is disabled temporarily

Tonblader 01-23-2021 06:49

Re: [ANY] Keep Player Name [Updated 23-01-21] Version 1.1.1
 
Quote:

Originally Posted by Teamkiller324 (Post 2733885)
The new 1.1.1 should fix the crash issue and cookies not functioning correctly as i somehow messed that part up lol, my bad

OnClientSettingsChanged function is not working properly and just spams errors instead and is disabled temporarily

I have been doing tests and it doesn't crash anymore, but when I use sm_forcename Tonblader hello
and then use in console
setinfo name 12345
I can change my name, when I shouldn't.

Marttt 01-23-2021 06:50

Re: [ANY] Keep Player Name [Updated 23-01-21] Version 1.1.1
 
Nice! Maybe as a new feature, you could add support to SetAuthIdCookie too.
To be able to add player names even when they still didn't join the server (through STEAMID).
Since I never used this command I may be wrong.

Teamkiller324 01-23-2021 06:58

Re: [ANY] Keep Player Name [Updated 23-01-21] Version 1.1.2
 
1.1.2 Fixes the OnClientSettingsChanged issue. (I tested renaming myself and that auto changes back as the stored or forced name)

Teamkiller324 01-23-2021 07:02

Re: [ANY] Keep Player Name [Updated 23-01-21] Version 1.1.2
 
Quote:

Originally Posted by Tonblader (Post 2733892)
I have been doing tests and it doesn't crash anymore, but when I use sm_forcename Tonblader hello
and then use in console
setinfo name 12345
I can change my name, when I shouldn't.

You were able to since OnClientSettingsChanged function were disabled

Tonblader 01-23-2021 08:13

Re: [ANY] Keep Player Name [Updated 23-01-21] Version 1.1.2
 
Quote:

Originally Posted by Teamkiller324 (Post 2733899)
You were able to since OnClientSettingsChanged function were disabled

Now sm_forcename work fine, but sm_clearname now not work.
It's like the command does absolutely nothing.

Teamkiller324 01-23-2021 09:25

Re: [ANY] Keep Player Name [Updated 23-01-21] Version 1.1.2
 
Quote:

Originally Posted by Tonblader (Post 2733913)
Now sm_forcename work fine, but sm_clearname now not work.
It's like the command does absolutely nothing.

Should be fixed now.

Tonblader 01-23-2021 11:40

Re: [ANY] Keep Player Name [Updated 23-01-21] Version 1.1.2
 
Quote:

Originally Posted by Teamkiller324 (Post 2733924)
Should be fixed now.

I have the same problem i mentioned above.
I am doing this:
Close L4D2 > install plugin > Open L4D2 > map c1m1 > my actual name is Tonblader > sm_forcename Tonblader 12345 > sm_clearname 12345 > setinfo name Tonblader > my name return to 12345 > this should not happen no?

Teamkiller324 01-23-2021 19:44

Re: [ANY] Keep Player Name [Updated 23-01-21] Version 1.1.2
 
Quote:

Originally Posted by Tonblader (Post 2733942)
I have the same problem i mentioned above.
I am doing this:
Close L4D2 > install plugin > Open L4D2 > map c1m1 > my actual name is Tonblader > sm_forcename Tonblader 12345 > sm_clearname 12345 > setinfo name Tonblader > my name return to 12345 > this should not happen no?

That is most likely because you're using client listen server. Dedicated server behaves differently and SourceMod/MetaMod: Source is designed for dedicated server and not in-game client listen server.

Tonblader 01-23-2021 21:07

Re: [ANY] Keep Player Name [Updated 23-01-21] Version 1.1.2
 
Quote:

Originally Posted by Teamkiller324 (Post 2733994)
That is most likely because you're using client listen server. Dedicated server behaves differently and SourceMod/MetaMod: Source is designed for dedicated server and not in-game client listen server.

Quote:

L 01/23/2021 - 13:07:20: [SM] Exception reported: Client index 0 is invalid
L 01/23/2021 - 13:07:20: [SM] Blaming: all\keep_player_name.smx
L 01/23/2021 - 13:07:20: [SM] Call stack trace:
L 01/23/2021 - 13:07:20: [SM] [0] IsClientInGame
L 01/23/2021 - 13:07:20: [SM] [1] Line 73, D:\scripting\spedit\sourcepawn\configs\sm_1_1 0\include\multicolors/colors.inc::C_PrintToChat
L 01/23/2021 - 13:07:20: [SM] [2] Line 78, D:\scripting\spedit\sourcepawn\configs\sm_1_1 0\include\multicolors.inc::CPrintToChat
L 01/23/2021 - 13:07:20: [SM] [3] Line 198, D:\scripting\Keep Player Name\addons\sourcemod\scripting\keep_player_n ame.sp::ForceName
Yes, the problem is related to the client index 0, then the problem is only me, as host, but for the other users that if they have a client index 1 or more, it should not cause major problems.

Marttt 01-23-2021 21:09

Re: [ANY] Keep Player Name [Updated 23-01-21] Version 1.1.3
 
type through the chat instead console.

!clearname 12344

for the listen server host, using console the client index will always be 0 and in chat usually 1

Tonblader 01-23-2021 21:22

Re: [ANY] Keep Player Name [Updated 23-01-21] Version 1.1.3
 
Quote:

Originally Posted by Marttt (Post 2734011)
type through chat instead console
!clearname 12344
using console the client index will be 0 and in chat usually 1

It's true, this worked, the bad thing is that the errorlog will be spamming me with the client index 0 problem.

DarkDeviL 01-23-2021 22:06

Re: [ANY] Keep Player Name [Updated 23-01-21] Version 1.1.3
 
Quote:

Originally Posted by Teamkiller324 (Post 2733885)
[...] as i somehow messed that part up lol, my bad

Don't worry, just make it even better... :)

Quote:

Originally Posted by Teamkiller324 (Post 2733885)
OnClientSettingsChanged function is not working properly and just spams errors instead and is disabled temporarily

Maybe if you did the actual coding properly, it would work properly too? The errors are signs that you are not doing things "properly".

Your code that included "OnClientSettingsChanged", also seem to be including a
Code:

stock        bool        IsValidClient(int client)
where a lot (BUT NOT ALL!) of your functions uses IsValidClient first.

OnClientSettingsChanged did however not.

Code:

public        void        OnClientSettingsChanged(int client)        {
        if(IsClientInGame(client) && !IsFakeClient(client))        {
                if(GetClientTeam(client) > 0)        {
                        setcookies(client,        true);
                }
        }
}

... so maybe, if you changed that one to:

Code:

public        void        OnClientSettingsChanged(int client)        {
/* Added IsValidClient before IsClientInGame */
/* Removed IsFakeClient, as it is already a part of  IsValidClient */
        if(IsValidClient(client) && IsClientInGame(client))        {
                if(GetClientTeam(client) > 0)        {
                        setcookies(client,        true);
                }
        }
}

should solve the issue, as IsValidClient already checks if the client id is 1 or below/equal to MaxClients, ... if you really insist on mixing different patterns across your code.


OR, AN ALTERNATIVE WAY FOR MORE CONSISTENCY: Change your IsValidClient bool, to like e.g.:

Code:

stock        bool        IsValidClient(int client)        {
        if(client        <        1)
                return        false;
        if(client        >        MaxClients)
                return        false;
/* ADDITIONS BELOW */
        if(!IsClientInGame(client))
                return        false;
/* ADDITIONS ABOVE */
        if(IsFakeClient(client))
                return        false;
        return        true;
}

And simply used e.g.:

Code:

public        void        OnClientSettingsChanged(int client)        {
/* Changed IsClientInGame, to your IsValidClient */
/* Removed IsFakeClient, as it is already a part of  IsValidClient */
        if(IsValidClient(client))        {
                if(GetClientTeam(client) > 0)        {
                        setcookies(client,        true);
                }
        }
}

This way, you can also add multiple sanity checks to your IsValidClient, and make one change stick across all your functions, where you use your IsValidClient.


Code:

if(GetClientTeam(client) > 0)
0 is unassigned, but the actual spectator is above 0, as far as I remember?

Do you really care about spectators? Otherwise, you might want to look into this one somehow else.

From include/cstrike.inc, after commit a615c13, made on 2021-01-14:

Code:

#define CS_TEAM_NONE        0  /**< No team yet. */
#define CS_TEAM_SPECTATOR  1  /**< Spectators. */
#define CS_TEAM_T          2  /**< Terrorists. */
#define CS_TEAM_CT          3  /**< Counter-Terrorists. */

From include/tf2.inc, after commit a615c13, made on 2021-01-14:

Code:

enum TFTeam
{
        TFTeam_Unassigned = 0,
        TFTeam_Spectator = 1,
        TFTeam_Red = 2,
        TFTeam_Blue = 3
};


I cannot guarantee you that all games have the same "team numbers" though, but if you don't care about spectators, just as you don't care about unassigned, ... maybe you should also update your "filters" here?


Just my two cents, ... or maybe a couple of more cents, but whatever.


Quote:

Originally Posted by Tonblader (Post 2733819)
In Left 4 Dead 2 Listen Server Windows, when i use sm_forcename Tonblader hola , my game crash, no errorlog.

I see many threads saying: SourceMod is NOT supported on "listen servers".

Switch to SRCDS, and most (if not all) of your issues will likely vanish.

Quote:

Originally Posted by Tonblader (Post 2734012)
It's true, this worked, the bad thing is that the errorlog will be spamming me with the client index 0 problem.

Even with some of the coding suggestions above, it most likely still won't work for you, when you are running a listen server...

Tonblader 01-23-2021 22:52

Re: [ANY] Keep Player Name [Updated 23-01-21] Version 1.1.3
 
Quote:

Originally Posted by DarkDeviL (Post 2734014)
I see many threads saying: SourceMod is NOT supported on "listen servers".

Switch to SRCDS, and most (if not all) of your issues will likely vanish.

It is true and despite this, the plugins work on the listening server, many of these work without showing me errorlogs, using chat commands.

The other reason why I use Listen Server, is because it offers me better MS/ping, unlike a dedicated server, because I need it hand in hand with this plugin:
[L4D2] Auto Bunnyhop

Teamkiller324 01-23-2021 22:57

Re: [ANY] Keep Player Name [Updated 23-01-21] Version 1.1.3
 
Ty DarkDeviL :)

when i wrote the plugin, i was up too long as i couldn't sleep but i appreciate your help, i will definitely try solve the problems now before just pushing out an update and think it's "ok". :)

Have some special bacon :bacon!::bacon!::bacon!::bacon!:

Lannister 01-27-2021 07:58

Re: [ANY] Keep Player Name [Updated 25-01-21] Version 1.1.5
 
Looking forward this!

Good job man!

Teamkiller324 01-29-2021 14:34

Re: [ANY] Keep Player Name [Updated 25-01-21] Version 1.1.5
 
Quote:

Originally Posted by Lannister (Post 2734472)
Looking forward this!

Good job man!

Thanks, mate. :)

jjambo789 01-30-2021 06:20

Re: [ANY] Keep Player Name [Updated 25-01-21] Version 1.1.5
 
I look forward to Mysql version.
I hope it comes out soon.

Teamkiller324 01-30-2021 08:04

Re: [ANY] Keep Player Name [Updated 25-01-21] Version 1.1.5
 
Quote:

Originally Posted by jjambo789 (Post 2734903)
I look forward to Mysql version.
I hope it comes out soon.

once i get to learn code the mysql functionality between the plugin and database, i'll try work on it :)

Have some bacon in the meanwhile :bacon!::bacon!:

jjambo789 02-07-2021 00:39

Re: [ANY] Keep Player Name [Updated 25-01-21] Version 1.1.5
 
Quote:

Originally Posted by Teamkiller324 (Post 2734919)
once i get to learn code the mysql functionality between the plugin and database, i'll try work on it :)

Have some bacon in the meanwhile :bacon!::bacon!:

Thanks :)

jjambo789 03-08-2021 23:29

Re: [ANY] Keep Player Name
 
MySQL Version 1.2.0

I'm looking forward to the best

Teamkiller324 03-10-2021 10:43

Re: [ANY] Keep Player Name
 
Once MySQL support is finished, a web interface would be handy for this plugin. utilizing some possibilities.

Tonblader 08-09-2021 01:29

Re: [ANY] Keep Player Name
 
Can add a cvar to turn on/off in real game-time ?

ascor 08-16-2021 17:10

Re: [ANY] Keep Player Name
 
update? is mysql support coming soon? :avast:

Sandervraun 02-22-2022 03:07

Re: [ANY] Keep Player Name
 
Quote:

Originally Posted by ascor (Post 2755382)
update? is mysql support coming soon? :avast:

Bumping this as I also would love to see the mysql support.

Also is it possible to make this local saving to a text file?

Sandervraun 03-26-2022 01:07

Re: [ANY] Keep Player Name
 
Quote:

Originally Posted by Tonblader (Post 2754831)
Can add a cvar to turn on/off in real game-time ?

Great idea! could be very nice!

jjambo789 03-20-2024 05:52

Re: [ANY] Keep Player Name
 
Have you given up on MySQL support?


All times are GMT -4. The time now is 07:27.

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