OnEntityModelChange
This event is triggered when a entity has changed model.
C# Syntax
[ServerEvent(Event.EntityModelChange)]
Parameters
- handle: parameter input should be in NetHandle type
- oldModel: parameter input should be in uint type
Example
[ServerEvent(Event.EntityModelChange)]
public void OnEntityModelChange(NetHandle handle, uint oldModel)
{
switch (handle.Type)
{
case EntityType.Player:
{
var player = handle.Entity<Client>();
player.SendChatMessage($"Your model has changed from {oldModel} to {player.Model}!");
break;
}
}
}