08.08.2013, 20:24
pawn Код:
new car = 17; car = 36; car = 37; car = 34; car = 35; car = 22; car = 31; car = 29; car = 30; car = 23; car = 18; car = 19; car = 20; car = 21; car = 24; car = 25; car = 26; car = 32; car = 33; car = 356; car = 357;
I'd store the vehicleids to an array and then simply:
pawn Код:
// Inside the /fvr command
for( new v = 0; v < MAX_VEHICLES; v++ )
{
if( !IsVehicleOccupied( Vehicles[ v ][ PlayerInfo [playerid ][ pFaction ] ] ) ) SetVehicleToRespawn( Vehicles[ v ][ [ PlayerInfo [playerid ][ pFaction ] ] );
}
stock IsVehicleOccupied( vehicleid )
{
for( new i = 0; i < MAX_PLAYERS; i++)
{
if( IsPlayerInVehicle( i, vehicleid ) ) return 1;
}
return 0;
}