View Single Post
Fortis
Junior Member
Join Date: Nov 2016
Old 10-16-2021 , 12:48   Re: MarkNativeAsOptional - inconvenient moment.
Reply With Quote #8

Quote:
Originally Posted by client21 View Post
Don't ask me why I need it, just accept the fact that I need it
We're asking why because if you don't create the native in AskPluginLoad2 then to my knowledge no other plugin can use it besides the one it was created in. (Read the Wiki Under Registering Natives) At that point why create a Native if only one plugin is gonna use it? If you're ultimately set on creating a native with a delay, just use a timer, just note only this plugin can use it.

PHP Code:
#include <z>

public void OnPluginStart()
{
    
CreateTimer(2.0Timer_Natives);
}

public 
Action Timer_Natives(Handle timer)
{
    
CreateNative("Test_Z"Native_Z);
    return 
Plugin_Handled;


Last edited by Fortis; 10-16-2021 at 14:26. Reason: I forgot some information, was on mobile at the time.
Fortis is offline