Thread
:
Better way to check if exist other than for loop
View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
04-16-2021 , 08:30 Re: Better way to check if exist other than for loop
#
4
I would load an array with the skills he doesn't have and then to get a new skill, use random() to index it.
Or if you don't need random, use an array that maintains which skills a player doesn't have, as he gets a new one, set the index to true. When he needs a new skill, cycle through this array and any that are false are assignable.
__________________
Plugins
|
CSStats Editor
|
nVault Editor
Last edited by Bugsy; 04-16-2021 at
08:36
.
Bugsy
View Public Profile
Send a private message to Bugsy
Find More Posts by Bugsy