You create one variable called Kart
Than you assign this variable in each line a new value
pawn Код:
new x;
x = 3;
x = 7;
x = 2;
x = 4;
Like expected the variable will only hold the number of the last vehicleid (or in my example 4)
pawn Код:
//for correct indention
new Kart;
Kart = AddStaticVehicle(571,1438.0006,-2481.6172,12.8384,269.9625,36,2); // minigame kart 1
SetVehicleVirtualWorld(Kart, 15);
Kart = AddStaticVehicle(571,1438.2340,-2486.0935,12.8387,272.8651,51,53); // minigame kart 2
SetVehicleVirtualWorld(Kart, 15);
Kart = AddStaticVehicle(571,1438.0760,-2490.6670,12.8382,268.9253,91,2); // minigame kart 3
SetVehicleVirtualWorld(Kart, 15);
Kart = AddStaticVehicle(571,1438.0946,-2496.9231,12.8384,270.5941,11,22); // minigame kart 4
SetVehicleVirtualWorld(Kart, 15);
//Or without saving the id in a variable
SetVehicleVirtualWorld(AddStaticVehicle(571,1438.0006,-2481.6172,12.8384,269.9625,36,2), 15); // minigame kart 1
SetVehicleVirtualWorld(AddStaticVehicle(571,1438.2340,-2486.0935,12.8387,272.8651,51,53), 15); // minigame kart 2
SetVehicleVirtualWorld(AddStaticVehicle(571,1438.0760,-2490.6670,12.8382,268.9253,91,2), 15); // minigame kart 3
SetVehicleVirtualWorld(AddStaticVehicle(571,1438.0946,-2496.9231,12.8384,270.5941,11,22), 15); // minigame kart 4