11.01.2012, 19:43
I need a code to limit VehicleSpawn, over the 15.0 distance from another car.
stock IsPlayerNearAnyVehicle( playerid, Float:distance )
{
new Float:x, Float:y, Float:z;
for( new i; i < MAX_VEHICLES; i ++ )
{
if ( GetVehicleModel( i ) )
{
GetVehiclePos( i, x, y, z );
if( GetPlayerDistanceFromPoint( playerid, x, y, z) <= distance )
return 1;
}
}
return 0;
}