View Single Post
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 04-19-2021 , 22:28   Re: Better way to check if exist other than for loop
Reply With Quote #9

Quote:
Originally Posted by Bugsy View Post
It will assign a new skill at random regardless of order as defined in the enum. I am not sure what you mean by the number of skills increasing by register native. You'd need to show more code
PHP Code:
Public Native_Register_Skill(plugin_idplugin_param)
{
    new 
s_Name[32], s_Desc[32], funcid_get;
        
get_string(1s_Namecharsmax(s_Name);
    
get_string(2s_Desccharsmax(s_Desc);

    
funcid_get get_param(3)

    
ArrayPushString(Skill_Names_Name)
    ... 
    ...

    
g_TotalSkill++
    return 
g_TotalSkill-1

This is what I mean. The skill is from a separate plugin and will register to main plugins via this native.
So I can't use enum as it is predetermine.
__________________
My plugin:

Last edited by Celena Luna; 04-19-2021 at 22:31. Reason: grammar x4
Celena Luna is offline