Raised This Month: $ Target: $400
 0% 

Better way to check if exist other than for loop


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:38.


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