22.06.2015, 19:34
Hello!
You forgot the Float:-Tag.
- Mencent
You forgot the Float:-Tag.
PHP Code:
stock PlacaVeiculoPerto(playerid)
{
new Float:distance = 10.0, Float: currentDistance = 11.0, vehicleid = 0, Float:Pos[3];
for(new i; i < MAX_VEHICLES; i++)
{
GetVehiclePos(i, Pos[0], Pos[1], Pos[2]);
currentDistance = GetPlayerDistanceFromPoint(playerid, Pos[0], Pos[1], Pos[2]);
if(currentDistance <= 7.0 && currentDistance < distance) {
vehicleid = i;
distance = currentDistance;
}
}
return vehicleid;
}
- Mencent