Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typdef struct FunctionInfo
- {
- char *name;
- FunctionTypes type;
- [sometype] address;
- }FuctionInfo;
- enum FunctionTypes
- {
- FUNCTION_AMX, //some misc func which is executed using ExecuteAmxFunction
- FUNCTION_PLUGIN, //function is in my code
- FUNCTION_STD_LOGICAL, //equal_to, greater, less, etc.
- };
- FunctionType functions[] =
- {
- {"asdasdad", FUNCTION_AMX, 0x480}, //ExecuteAmx understands 0x480
- {"equal_to", FUNCTION_STD_LOGICAL, equal_to<int>()},
- {"bla", FUNCTION_PLUGIN, FunctionInMyCode}
- };
- int ExecuteAmxFunction(int address, int params[], param_count)
- {
- .....
- }
- cell AMX_NATIVE_CALL algo_lts(AMX* amx, cell* params)
- {
- //bla bla bla
- switch(params[2])
- {
- case FUNCTION_AMX:
- while(start != end)
- {
- [bla bla bla]
- if(ExecuteAmxFunction(functions[params[3]].address, some_array, array_size)) return false;
- }
- return true;
- case FUNCTION_STD_LOGICAL:
- std_lib_func(bla, bla, bla, functions[params[3]].address);
- }
- }
Add Comment
Please, Sign In to add comment