19.12.2016, 14:04
Hi, Is it possible to check if an array contains a certain number without looping through the elements?
I think container data types like vector is possible by using this plugin.
https://sampforum.blast.hk/showthread.php?tid=238844 |
#define arrfind(%0,%1) strfind(%0,{%1},false,0)
main()
{
new array[]={6,2,3,3,2340,78};
printf( "index = %d" , arrfind(array,3));//will print 2
}