Thema: Random cache
Einzelnen Beitrag anzeigen
Alt 11.03.2016, 10:01   #1 (permalink)
@Survival
Newbie
 
Benutzerbild von @Survival
 
Registriert seit: 12.02.2013
Beiträge: 7
Standard Random cache

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 (isServerthen {
_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 10];


//Fix ammo box to ground level
_newpos getPosASL _box;

_box setPos [_newpos select 0_newpos select 10];
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.
@Survival ist offline