AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved Native filter (https://forums.alliedmods.net/showthread.php?t=321125)

Sanjay Singh 01-26-2020 07:40

Native filter
 
How to use native filter any tut?

OciXCrom 01-26-2020 08:01

Re: Native filter
 
Code:
native name_of_native_function(param1, param2, param3) new bool:g_bIsNativeAvailable public plugin_init() {     if(LibraryExists("name_of_library", LibType_Library))     {         g_bIsNativeAvailable = true     } } public plugin_natives() {     set_native_filter("native_filter") } public native_filter(const szNative[], id, iTrap) {     if(equal(szNative, "name_of_native_function"))     {         return PLUGIN_HANDLED     }         return PLUGIN_CONTINUE } public some_function() {     if(g_bIsNativeAvailable)     {         name_of_native_function(id, 250, bla bla)     } }

Full example here.


All times are GMT -4. The time now is 02:40.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.