Help NPC
#2

Код:
if(BusID[playerid] == 1)
{
    GetVehiclePos(NPCBlueBus, busx, busy, busz);
    GetVehicleZAngle(NPCBlueBus, angle);
}
else
{
    GetVehiclePos(NPCBlackBus, busx, busy, busz);
    GetVehicleZAngle(NPCBlackBus, angle);
}
Use 'else if' if you need to add more checks.

Review https://sampwiki.blast.hk/wiki/Control_Structures

EDIT: Just realized that code does the same thing in both blocks, because you dont change the variables 'NPCBlueBus', 'busx', 'busy' and 'busz'. So it will not do what you want it to.
Reply


Messages In This Thread
Help NPC - by MushLand - 27.09.2015, 08:35
Re: Help NPC - by iggy1 - 27.09.2015, 08:40
Re: Help NPC - by MushLand - 27.09.2015, 09:02
Re: Help NPC - by iggy1 - 27.09.2015, 09:17
Re: Help NPC - by MushLand - 27.09.2015, 11:27

Forum Jump:


Users browsing this thread: 1 Guest(s)