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



IsInCopCar - Chrham_2 - 20.02.2010

Hello


This is a easy thing, but I've forgotten it. haven't scripted in a while.


I don' remember how to check which car is a cop car
Код:
public IsACopCar(///????///)
{
	///???///
	{
		return 1;
	}
	return 0;
}
how do I find out that?


Re: IsInCopCar - [LSR]State_Trooper - 20.02.2010

Код:
forward IsACopCar(vehicleid);

Код:
public IsACopCar(vehicleid)
{
	if( GetVehicleModel(vehicleid) == 596 || GetVehicleModel(vehicleid) == 595 || GetVehicleModel(vehicleid) == 597 ) {
		return 1;
	}
	return 0;
}
Hopefully this helped


Re: IsInCopCar - bajskorv123 - 20.02.2010

Here is the cop and fbi cars + the predator boat + police maverick
pawn Код:
forward IsInCopCar(vehicleid);
public IsInCopCar(vehicleid)
{
  switch(GetVehicleModel(vehicleid))
  {
    case 427, 430, 490, 497, 528,
    596, 597, 598, 599, 601:
    {
      return 1;
    }
  }
  return 0;
}



Re: IsInCopCar - Chrham_2 - 20.02.2010

Quote:
Originally Posted by [LSR
State_Trooper ]
Код:
forward IsACopCar(vehicleid);

Код:
public IsACopCar(vehicleid)
{
	if( GetVehicleModel(vehicleid) == 596 || GetVehicleModel(vehicleid) == 595 || GetVehicleModel(vehicleid) == 597 ) {
		return 1;
	}
	return 0;
}
THANKS A BUNCH!

Hopefully this helped



Re: IsInCopCar - [LSR]State_Trooper - 20.02.2010

Glad it worked for you. if u need any more help, add me on msn: bradley@policecarmods.com Infact, anyone else who needs help also add me!