add sample

This commit is contained in:
ineed bots
2025-09-20 20:53:00 -06:00
parent afbbdd2d11
commit 25f827da0d

View File

@@ -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: