mirror of
https://github.com/JezuzLizard/T4SP-Server-Plugin.git
synced 2025-10-07 15:06:40 +00:00
add sample
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "loader/component_loader.hpp"
|
||||
|
||||
#include <utils/hook.hpp>
|
||||
#include "gsc.hpp"
|
||||
|
||||
namespace test
|
||||
{
|
||||
@@ -14,6 +15,15 @@ namespace test
|
||||
public:
|
||||
void post_unpack() override
|
||||
{
|
||||
gsc::function::add("testfunc", []()
|
||||
{
|
||||
game::Com_Printf(game::CON_CHANNEL_DONT_FILTER, "this is a test builtin\n");
|
||||
});
|
||||
|
||||
gsc::method::add("testmeth", [](game::scr_entref_t ref)
|
||||
{
|
||||
game::Com_Printf(game::CON_CHANNEL_DONT_FILTER, "this is a test builtin on ent %d\n", ref.entnum);
|
||||
});
|
||||
}
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user