[UNSOLVED] make it arrayed - 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: [UNSOLVED] make it arrayed (
/showthread.php?tid=88382)
[UNSOLVED] make it arrayed -
pixelhotel - 26.07.2009
Hello,
I'm using the folowing code to define factioncars:
pawn Код:
public IsACopCar(carid)
{
if((carid >= 35) && (carid <= 60) || carid == 66 || carid == 67 || carid == 91 || carid == 92 || carid == 93 || carid == 36)
{
if((carid >= 121) && (carid <= 125) || carid == 45 || carid == 46 || carid == 55 || carid == 59) { return 0; }
return 1;
}
return 0;
}
how to make an array of carids, so I don't need to retype them?
(I know it's probably very easy, but I didn't find it immidietly in the help, please help me)
thanks in advance, Jonasty
Re: [UNSOLVED] make it arrayed -
Joe Staff - 26.07.2009
You can use variables to keep track of create vehicles. Like copcar[31] = CreateVehicle(..) while under OnGameModeInit
Re: [UNSOLVED] make it arrayed -
pixelhotel - 27.07.2009
oww yeah, forgot that
but an easier way to check them then? because when using vars you'll have to enter all of them in it not?
(as you can't use the same variable name twice...)
off topic: you're hangman animation has a fault, he's hanging already, then you hang him