[HELP] Finding a cars colour
#6

pawn Код:
new carcolor[MAX_VEHICLES][2]

stock SetVehicleColor(vehicleid, color1, color2)
{
  ChangeVehicleColor(vehicleid, color1, color2);
  carcolor[vehicleid][0] = color1;
  carcolor[vehicleid][1] = color2;
}

stock GetVehicleColor(vehicleid, bool:primary) return primary?carcolor[vehicleid][0]:carcolor[1][vehicleid];
/*if the second parameter is true, it will return the primary color, else secondary*/
Here's just an example. It can be done better. Also GetVehicleColor wont work if you don't do SetVehicleColor first
Reply


Messages In This Thread
[HELP] Finding a cars colour - by jonrb - 12.09.2009, 12:04
Re: [HELP] Finding a cars colour - by [eLg]Timmy - 12.09.2009, 12:07
Re: [HELP] Finding a cars colour - by x-unit - 12.09.2009, 12:08
Re: [HELP] Finding a cars colour - by jonrb - 12.09.2009, 12:14
Re: [HELP] Finding a cars colour - by [eLg]Timmy - 12.09.2009, 12:25
Re: [HELP] Finding a cars colour - by dice7 - 12.09.2009, 12:27
Re: [HELP] Finding a cars colour - by jonrb - 12.09.2009, 14:40

Forum Jump:


Users browsing this thread: 1 Guest(s)