mirror of
https://github.com/roflmuffin/CounterStrikeSharp.git
synced 2025-12-05 23:58:24 -08:00
fix: name overlap of some properties
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user