How to use AttachObjectToVehicle and keep the vehicle always spawned
#4

I assume Cop[] is holding the vehicle IDs? You should name stuff better so you know what it does, for example 'CopVehicle'.

If you want to create 10 cop cars, then you need to declare an array with 10 cells in outside all callbacks/functions, as you said. The first ID is 0 and last is 9, so you want to do:

pawn Код:
CopVehicle[0] = CreateVehicle();
CopVehicle[1] = CreateVehicle();
CopVehicle[2] = CreateVehicle();
CopVehicle[3] = CreateVehicle();
CopVehicle[4] = CreateVehicle();
CopVehicle[5] = CreateVehicle();
CopVehicle[6] = CreateVehicle();
CopVehicle[7] = CreateVehicle();
CopVehicle[8] = CreateVehicle();
CopVehicle[9] = CreateVehicle();
in OnGameModeInit.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)