Event player_connect can only get BOT Networkid
INoriEGOIST opened this issue · comments
Here's my nut,i type this on my phone so maybe there will be some api name spill default,sry
IncludeScript("vs_library");
VS.ListenToGameEvent( "player_connect", function( event )
{
printl("Success get player");
print("Player NetworkId "+event.networkid);
print("Player userId "+event.userid);
print("Player name "+event.name);
}, "GetPlayerInfo");
This is mentioned in the readme under the "Use on dedicated servers" section. When the map is changed in a listen server using the console commands map
or changelevel
, the server is not shut down, you, the player is not disconnected, and thus the player does not fire the player_connect event. To prevent this you need to disconnect from your local server, then launch it again.
Thanks a lot,it's seems i could only find another way to manage players info
After taking a second look I figured out a way to get Steam name and SteamIDs in listen servers. However the issue still exists on dedicated servers. Please try again using v2.43.0, and see if it works fine.