21.10.2012, 18:47
Hello all!
I need a speedometer and cmd witch respawn all unused cars.
thanx!
I need a speedometer and cmd witch respawn all unused cars.
thanx!
stock IsVehicleOccupied(vehicleid) // Returns 1 if there is anyone in the vehicle
{
for(new i=0;i<MAX_PLAYERS;i++;)
{
if(IsPlayerInAnyVehicle(i))
{
if(GetPlayerVehicleID(i)==vehicleid)
{
return 1;
}
else
{
return 0;
}
}
}
return 1;
}
CMD:respawncars(playerid, params[])
{
for(new i=0; i<MAX_VEHICLES; i++)
{
if(!IsVehicleOccupied(i))
{
DestroyVehicle(i);
}
}
return 1;
}