24.10.2010, 18:22
Try this:
pawn Код:
for(new i=0; i<MAX_VEHICLES; i++)
{
new pcount=0;
for(new pl=0, tx=GetMaxPlayers(); pl<=tx; pl++)
{
if(IsPlayerConnected(pl))
{
if(GetPlayerVehicleID(pl)==i)
{
pcount++;
break;
}
}
}
if(pcount==0)SetVehicleToRespawn(i);
}