Quick Question - Loops/Team vehicles
#1

Hey,

I was adding team vehicles to my server, and then I thought of something.

Instead of having

pawn Код:
new SwatCars[2]; // Top

SwatCars[0] = CreateVehicle(..
SwatCars[1] = CreateVehicle(.. // OnGameModeInit

if(vehicleid == SwatCars[0] || vehicleid == SwatCars[1]) // OnPlayerEnterVehicle
Would I be able to loop through the swat vehicles? Like this,

pawn Код:
#define MAX_SWAT 2
new SwatCars[MAX_SWAT];

SwatCars[0] = CreateVehicle(..
SwatCars[1] = CreateVehicle(..

for(new i = 0; i < MAX_SWAT; c++) {
if(vehicleid == SwatCars[i])}
Thanks
Reply


Messages In This Thread
Quick Question - Loops/Team vehicles - by FunnyBear - 09.03.2015, 15:06
Re: Quick Question - Loops/Team vehicles - by biker122 - 09.03.2015, 15:09
AW: Quick Question - Loops/Team vehicles - by Kaliber - 09.03.2015, 15:11

Forum Jump:


Users browsing this thread: 3 Guest(s)