OOP Implementation of the RAGEMP server events (so you don't have to use [Command] or [ServerEvent] annotations). It allows you to add event handlers and commands at runtime.
-
Copy
/client_packages/cs_packages/CustomCommands.csto your server client resources (server-files/client_packages/cs_packages). -
From folder 'server' import
Delegates.csandEvents.csinto your server-side project. -
Add
using robearded;at the top of the files where you want to use my API. -
Use
Events.*EventName* += EventHandler;to add an event handler andEvents.AddCommand("*commandName*", CommandHandler);to add a command handler.
OnPlayerReady(Client client)-> This event is not available by default on the C# API
If any other events will be custom implemented they will be added here ^
You can find an example inside the 'example' folder.