27.10.2012, 11:09
@sgtjones12
He doesnt need to add it. it is a samp function.
check if your includes are updated and recompile gamemode.
EDIT - heres a code for GetClosestVehicleFromPoint..if you are trying to make that
Credits - gamer931215
He doesnt need to add it. it is a samp function.
check if your includes are updated and recompile gamemode.
EDIT - heres a code for GetClosestVehicleFromPoint..if you are trying to make that
pawn Код:
stock GetClosestVehicleFromPoint(Float:x,Float:y)
{
new Float:distance = 2222,Float:tx,Float:ty,Float:z,vehicleid = -1;
for(new i = 0;i<MAX_VEHICLES;i++)
{
GetVehiclePos(i,tx,ty,z);
new Float:temp = GetDistanceBetweenPoints(x,y,tx,ty);
if(temp < distance)
{
vehicleid = i;
distance = temp;
}
}
return vehicleid;
}