23.11.2017, 00:42
cHook
this is work in process, so I am open for suggestions
Just a small example
Note: This version is limited to basic code, any external function will crash your server
Download and readme => github
Tested on windows, with g++ and objdump
this is work in process, so I am open for suggestions
Just a small example
PHP Code:
#include <a_samp>
#include <chook> // this include forces you to compile with chook, see github
cHook: test((( // chook: namespace (not used yet)
int gInt = 4;
CHOOK_PAWN myfunc(a, Float: b) {
return a + b + gInt;
}
)))
main() { // at the moment it is myfunc, in a upcoming version it will be test::myfunc
printf("%d", myfunc(1, 3.0)); // should print "8" (1 + 3 + 4)
}
Download and readme => github
Tested on windows, with g++ and objdump