[Help] Public IsAPlane
#3

It is more easier if you check the model of the vehicle instead of it's ID, but it only works if you don't care about that the vehicle is the property of a faction or not. For example, this script returns 1 if you are in a plane and it returns 0 if you are not in one. If you want to check if a vehicle belongs to a faction, you have to do it with the vehicle IDs.

pawn Код:
public IsAPlane(carid)
{
   if(GetVehicleModel(carid) == 592 || GetVehicleModel(carid) == 577 || GetVehicleModel(carid) == 511 || GetVehicleModel(carid) == 512 || GetVehicleModel(carid) == 593 || GetVehicleModel(carid) == 520 || GetVehicleModel(carid) == 553 || GetVehicleModel(carid) == 476 || GetVehicleModel(carid) == 519 || GetVehicleModel(carid) == 460 || GetVehicleModel(carid) == 513)
   {
     return 1;
   }
   return 0;
}
Reply


Messages In This Thread
[Help] Public IsAPlane - by Rosco_Rich - 28.05.2010, 17:53
Re: [Help] Public IsAPlane - by DeathOnaStick - 28.05.2010, 17:59
Re: [Help] Public IsAPlane - by LTomi - 28.05.2010, 18:05
Re: [Help] Public IsAPlane - by Rosco_Rich - 28.05.2010, 18:14

Forum Jump:


Users browsing this thread: 1 Guest(s)