Array help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Array help (
/showthread.php?tid=274340)
Array help -
whitedragon - 05.08.2011
Hi i was wondering how to make something like that
for(i=0;i<25;i++)
{
String = something;
}
if(Array[playerid][String]) // String is array key name
Re: Array help -
iMonk3y - 05.08.2011
Are you looking for something that checks if a string matches any of the strings in the array?
Re: Array help -
whitedragon - 05.08.2011
Yes, like check if it in array and i can use Array[playerid][String] value
in PHP it would be:
$value= "something";
if($array[playerid][$value])
Re: Array help -
iMonk3y - 05.08.2011
You could check out Westies strlib include
here, it has some useful functions
Re: Array help -
whitedragon - 05.08.2011
Example?
Re: Array help -
MadeMan - 05.08.2011
I don't think you can do it in pawn.