public void PlayerConnectedEvent(IExamplePlayerEntity player, string reason) { player.SetDateTime(DateTime.Now); player.Model = (uint)PedModel.FreemodeMale01; player.Position = spawnPosition; player.Rotation = spawnRotation; Console.WriteLine($"Player [{ player.Id }] { player.Name } - { player.Ip } has connected. Reason: \"{ reason }\"."); }
public bool WeaponDamagePerformedEvent(IExamplePlayerEntity player, IEntity target, uint weapon, ushort damage, Position shotOffset, BodyPart bodyPart) { Console.WriteLine($"Player [{ player.Id }] { player.Name } performed damage on entity ID { target.Id } with weapon ID { weapon }. Damage: { damage }; Body part: { bodyPart }."); return(true); }
public void PlayerRemovedEvent(IExamplePlayerEntity player) { Console.WriteLine($"Player [{ player.Id }] { player.Name } has been removed."); }
public void PlayerVehicleLeftEvent(IExampleVehicleEntity vehicle, IExamplePlayerEntity player, byte seat) { Console.WriteLine($"Player [{ player.Id }] { player.Name } has left vehicle ID { vehicle.Id }. Seat ID: { seat }."); }
public void PlayerDisconnectedEvent(IExamplePlayerEntity player, string reason) { Console.WriteLine($"Player [{ player.Id }] { player.Name } - { player.Ip } has disconnected. Reason: \"{ reason }\"."); }
public void PlayerDiedEvent(IExamplePlayerEntity player, IEntity killer, uint weapon) { player.Spawn(spawnPosition, 2000U); player.Rotation = spawnRotation; Console.WriteLine($"Player [{ player.Id }] { player.Name } has been killed by entity ID { killer.Id }. Weapon ID: { weapon }."); }
public void PlayerDamageTakenEvent(IExamplePlayerEntity player, IEntity attacker, uint weapon, ushort damage) { Console.WriteLine($"Player [{ player.Id }] { player.Name } has taken damage from entity ID { attacker.Id }. Weapon ID: { weapon }; Damage: { damage }."); }
public void PlayerCustomEventInvokedEvent(IExamplePlayerEntity player, string eventName, MValueConst[] mValueArray) { Console.WriteLine($"Player [{ player.Id }] { player.Name } has invoked a custom event named \"{ eventName }\":"); PrintValues(mValueArray); }
public void PlayerVehicleSeatChangedEvent(IExampleVehicleEntity vehicle, IExamplePlayerEntity player, byte oldSeat, byte newSeat) { Console.WriteLine($"Player [{ player.Id }] { player.Name } changed his vehicle seat ID from { oldSeat } to { newSeat } in vehicle ID { vehicle.Id }."); }