Hallo Leute !!!
Suche ein Script für random ammocaches!! hab da schon einige gefunden sowie das RCP usw..
Nur das Problem dabei ist die caches spawnen alle im freien würde sie aber gerne in nem Haus haben.
PHP-Code:
if (isServer) then {
_box = _this select 0;
//Get the position of the box
_pos = getPosATL _box;
//Get an array of all the towns and select one at random
_townlist = nearestLocations [getpos _box,
["NameCityCapital","NameCity","NameVillage"],500];
//Get town from array
_rnd = floor random (count _townlist);
_town = _townlist select _rnd;
_town_name = text (_town);
//Get town location
_locationPos = locationPosition (_town);
//Move ammobox to town location
_box setPosASL [_locationPos select 0, _locationPos select 1, 0];
//Fix ammo box to ground level
_newpos = getPosASL _box;
_box setPos [_newpos select 0, _newpos select 1, 0];
hint format ["%1",_box];
};
das hier hab ich auch probiert und schon umgeändert mit nearestobject(HAusnamen) usw.
entweder funktioniert es nicht in A3 oder ichmach iwas falsch.