05.08.2010, 02:49
Every second it checks the vehicle.
Here is the code:
Here is the code:
Code:
public UpdateCars()
{
new i,c,close;
new Float:X,Float:Y,Float:Z;
CheckLockedCars();
car:
if(c<800)
{
if(CarDestroy[c] == 1)
{
iplayers:
if(i<MAX_PLAYERS)
{
if(IsPlayerConnected(i))
{
GetVehiclePos(c,X,Y,Z);
if(IsPlayerInRangeOfPoint(i,70,X,Y,Z))
{
close++;
}
}
i++;
goto iplayers;
}
if(close==0)
{
if(CarDestroy[c] == 1)
{
DestroyVehicle©;
CarDestroy[c] = 0;
}
}
}
c++;
close=0;
goto car;
}
return 1;
}

