OnPlayerSetInfo
Usage
- No return behavior
Example Autogenerated
csharp
private void OnPlayerSetInfo( Connection connection, string key, string val )
{
Puts( "OnPlayerSetInfo works!" );
}
csharp
private void OnPlayerSetInfo( Connection connection, string name, string value )
{
Puts( "OnPlayerSetInfo works!" );
}
Location
- BasePlayer::SetInfo(string key, string val)
- ServerMgr::ClientReady(Network.Message packet)
csharp
//---
{
if (!this.IsConnected)
{
return;
}
Interface.CallHook("OnPlayerSetInfo", this.net.connection, key, val);
this.net.connection.info.Set(key, val);
}
csharp
//---
}
using (ClientReady clientReady = ClientReady.Deserialize(packet.read))
{
foreach (ClientReady.ClientInfo current in clientReady.clientInfo)
{
Interface.CallHook("OnPlayerSetInfo", packet.connection, current.name, current.value);
packet.connection.info.Set(current.name, current.value);
}
packet.connection.globalNetworking = clientReady.globalNetworking;
this.connectionQueue.JoinedGame(packet.connection);
Facepunch.Rust.Analytics.Azure.OnPlayerConnected(packet.connection);
//---