28.05.2010, 18:05
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;
}