mirror of
https://github.com/JezuzLizard/T4SP-Server-Plugin.git
synced 2025-10-08 07:26:43 +00:00
add sample
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
#include "loader/component_loader.hpp"
|
#include "loader/component_loader.hpp"
|
||||||
|
|
||||||
#include <utils/hook.hpp>
|
#include <utils/hook.hpp>
|
||||||
|
#include "gsc.hpp"
|
||||||
|
|
||||||
namespace test
|
namespace test
|
||||||
{
|
{
|
||||||
@@ -14,6 +15,15 @@ namespace test
|
|||||||
public:
|
public:
|
||||||
void post_unpack() override
|
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:
|
private:
|
||||||
|
Reference in New Issue
Block a user