Quote:
Originally Posted by Bugsy
Why don't you just look at the native to see what it does?
|
I don't have any idea where to get native sources , i searched and didn't find them , and nothing f important about natives in here:
https://www.amxmodx.org/api/
When i see this native for the first time , i felt that something wrong in it , and i was right .
i think there must be a general amxx plugin instead, that tracks events moment by moment and set players flags BOOLs method as the example above , and this general plugin should create a general native that gives information instantly without checking ( Teams, connections, status :alive...)
and here is a quick example of
Only_bool_Flags_Check:
PHP Code:
native wtf(....,char flags_to_check,..)
{
for (i=0; i<Hello ; i++) //int Hello represents the max ingame-players count (Pre-calculated)
{
j= 0;
While (j < strlen(flags_to_check) )
{
f=find_flag_index(flags_to_check[j++]);
if ( flags[p_index[i]][ f ] ) count++;
}
if (count==strlen(flags_to_check)) //player got all flags
wtf[x++]=p_index[i]; // so add him to array
}
*iMax = x;
}
find_flag_index(String:s_[1])
{
for (int i =0 ; i < max_flags ;i++)
{
if (allowed_flags[i]==s_[0])
return i;
}
SetFailure...;
}
another issue in
is_user_alive and other functions that
Shouldn't check if is_user_connected , cuze this will duplicate checking inside loops .
anyway , thank you Mr Bugsy , Correct me if i was wrong .