GetPCPlayerName Functionality Changed
Balanor
Member Posts: 176
Just posting as a PSA for other scripters doing work in a multiplayer module:
GetPCPlayerName does now return a the player name of a PC object even after that player has logged out of the game/server. This mattered for me because I would often use the "lazy man" method of the following to determine if a PC was logged off the server:
if (GetPCPlayerName(oPC) == "") {/*Do Something Here Since Player Has Logged Off*/}
But this method no longer works in EE and will always return the player name even after they've logged out of the server. So as a result of this change/improvement to GetPCPlayerName, I had to change quite a number of scripts to instead use an "IsOnline" variable that is placed on the PC object OnClientEnter and is removed in the OnClientLeave to truly determine if a PC is logged in, or not.
I was just thinking others might need to do the same, so I thought I'd mention it here to hopefully save you some time if it affects you too.
GetPCPlayerName does now return a the player name of a PC object even after that player has logged out of the game/server. This mattered for me because I would often use the "lazy man" method of the following to determine if a PC was logged off the server:
if (GetPCPlayerName(oPC) == "") {/*Do Something Here Since Player Has Logged Off*/}
But this method no longer works in EE and will always return the player name even after they've logged out of the server. So as a result of this change/improvement to GetPCPlayerName, I had to change quite a number of scripts to instead use an "IsOnline" variable that is placed on the PC object OnClientEnter and is removed in the OnClientLeave to truly determine if a PC is logged in, or not.
I was just thinking others might need to do the same, so I thought I'd mention it here to hopefully save you some time if it affects you too.
4
Comments