27.09.2015, 09:17
Oh yes i missed that.
Set it up like this:
Will be easier to read/edit if you define the constants.
Set it up like this:
Код:
if(BusID[playerid] == 1)
{
GetVehiclePos(NPCBlueBus, busx, busy, busz);
GetVehicleZAngle(NPCBlueBus, angle);
}
else if(BusID[playerid] == 2)//change '2' to the blackbus id
{
GetVehiclePos(NPCBlackBus, busx, busy, busz);
GetVehicleZAngle(NPCBlackBus, angle);
}
else if(BusID[playerid] == 3)//change '3' to the blackbus id
{
GetVehiclePos(NPCRedBus, busx, busy, busz);
GetVehicleZAngle(NPCRedBus, angle);
}
else
{
//it's not a black, blue or red bus
}
Код:
#define NPC_BLUE_BUS 1 //then you can do if(BusID[playerid] == NPC_BLUE_BUS)

