fix: name overlap of some properties

This commit is contained in:
Roflmuffin
2023-10-09 21:24:40 +10:00
parent 5be841ebfa
commit 12f795948f
2 changed files with 3 additions and 3 deletions

View File

@@ -46,7 +46,7 @@ namespace CounterStrikeSharp.API.Modules.Events
Handle = pointer;
}
public string Name => NativeAPI.GetEventName(Handle);
public string EventName => NativeAPI.GetEventName(Handle);
public bool GetBool(string name) => NativeAPI.GetEventBool(Handle, name);
public float GetFloat(string name) => NativeAPI.GetEventFloat(Handle, name);

View File

@@ -40,14 +40,14 @@ namespace TestPlugin
RegisterEventHandler<PlayerSpawn>("player_spawn", (@event) =>
{
Console.BackgroundColor = ConsoleColor.Red;
Console.WriteLine($"Event found {@event.Handle:X}, player name: {@event.Name}, userid: {@event.Userid}");
Console.WriteLine($"Event found {@event.Handle:X}, player name: {@event.EventName}, userid: {@event.Userid}");
Console.ResetColor();
});
RegisterEventHandler<PlayerJump>("player_jump", (@event) =>
{
Console.BackgroundColor = ConsoleColor.Blue;
Console.WriteLine($"Event found {@event.Handle:X}, player name: {@event.Name}, userid: {@event.Userid}");
Console.WriteLine($"Event found {@event.Handle:X}, player name: {@event.EventName}, userid: {@event.Userid}");
Console.ResetColor();
});
}