Quote:
Originally Posted by 1sbedx
PHP Code:
GetNearestVehicleFromPlayer(playerid, Float:distance = 30.0) {
new
Float:min_dist,
vehicleid = INVALID_VEHICLE_ID,
Float:x,
Float:y,
Float:z;
GetPlayerPos(playerid, x, y, z);
for (new i = (GetVehiclePoolSize() + 1); --i != 0;) {
if ((min_dist = GetVehicleDistanceFromPoint(i, x, y, z)) <= distance) {
vehicleid = i;
distance = min_dist;
}
}
return vehicleid;
}
|
Como eu faзo para mandar uma mensagem "Vocк nгo estб perto de um veiculo" ?