예제 #1
0
 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 }\".");
 }
예제 #2
0
 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);
 }
예제 #3
0
 public void PlayerRemovedEvent(IExamplePlayerEntity player)
 {
     Console.WriteLine($"Player [{ player.Id }] { player.Name } has been removed.");
 }
예제 #4
0
 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 }.");
 }
예제 #5
0
 public void PlayerDisconnectedEvent(IExamplePlayerEntity player, string reason)
 {
     Console.WriteLine($"Player [{ player.Id }] { player.Name } - { player.Ip } has disconnected. Reason: \"{ reason }\".");
 }
예제 #6
0
 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 }.");
 }
예제 #7
0
 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 }.");
 }
예제 #8
0
 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);
 }
예제 #9
0
 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 }.");
 }