Skip to content

GetPCPlayerName Functionality Changed

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.

Comments

  • dunahandunahan Member Posts: 139
    Okay, that is really helpful. I checked sometimes with GetIsObjectValid, but not to often.
  • BalanorBalanor Member Posts: 176
    I believe in 1.69 (and likely still in 1.74) the GetIsObjectValid function does return TRUE for a PC who has logged out. I'm pretty sure that was the reason why I ended up using the GetPCPlayerName == "" method to truly verify whether they were logged out.
Sign In or Register to comment.