SA-MP Forums Archive
Vehicle 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: Vehicle Help (/showthread.php?tid=127086)



Vehicle Help - Mini` - 11.02.2010

Okay so in my server, vehicle ID's are RELATIVE TO WHATS SPAWNED...
So.. Lets say a buffalo is the only car spawned.. It's ModelId is 402 or whatever, but the server classifies it as VehID 1.
And all my vehicle shit like "IsACopCar" and shit like that run on those. I want them to load via Model ID's or whatever you wanna call them. Relative to what vehicle it is..
Any help is appreciated..
I was thinking.. I've sen in servers Have like huge Arrays() with vehicle ID's in them and that this may have something to do with that? I'm not sure.


Re: Vehicle Help - Joe Staff - 11.02.2010

pawn Код:
new CopCars[12];

CopCars[0]=CreateVehicle(...);
CopCars[1]=CreateVehicle(...);
CopCars[2]=CreateVehicle(...);

IsACopCar(vehid)
{
  for(new veh;veh<12;veh++)if(CopCars[veh]==vehid)return 1;
  return 0;
}
Something amongst those lines.


Re: Vehicle Help - Mini` - 11.02.2010

Hmm yes that makes sense Dunno why I didn't think of that..
Anyway, thank you!