Helpvehicle spawn (normal dayz)

Posts 1–3 of 3 · Page 1 of 1
vehicle spawn (normal dayz)
Hello can anyone give me please a script for spawn some vehicle's in DayZ?

I found some scripts but they aren't working...
Try this. Not sure if it's outdated or anything like that. Just pulled it from a thread for you as I'm not on my PC. Keep in mind, this is only for normal DayZ.

Code:
/*
		== [ Undetected Vehicle Spawn No RE ] ==
		           [Made by Rustler 6/2]
	
	Info: This script has a classname scanner to check if the incoming classname will kick you

	If you are using this as a vehicle spawn script for a menu, replace 
	
	_classname = "VehicleClassNameHere"; 
	with
	_classname = _this select 0;
*/

_classname = "VehicleClassNameHere"; 


//return combos of first 5 chars
fn_genStrFront = 
{
	_array = toArray (_this select 0);
	_count = (_this select 1) - 1;
	_max = (count _array) - 1;
	_Num = [];
	for '_i' from 0 to _count do
	{
		if !(_i > _max) then {_Num = _Num + [_array select  _i];};
	};
	_firstNum = toString _Num;
	_firstNum
};

//return combos of last 5 chars
fn_genStrBack = 
{
	_array = toArray (_this select 0);
	_count = (_this select 1) - 1;
	_max = (count _array) - 1;
	_Num = [];
	for '_i' from 0 to _count do
	{
		if !((_max - (_count - _i)) > _max) then {_Num = _Num + [_array select (_max - (_count - _i))];};
	};
	_firstNum = toString _Num;
	_firstNum
};

//list of kickable strings from createvehicle.txt
kickable = ["SEAGULL","BOX","MINE","SADARM_","LASER_","WP_","_MLRS","_81","_82","_105","_120","_122","_227","_AA","_AT",
"_AP","_80","_57","_85","_100","_125","_30","_IED","_CRV7","_MEEWS","_SMAW","_GRAD","_SABOT","_SH","KORD","DSHKM","MK19",
"AGS","NEST_","R_PG","R_OG","B_","_YAKB","COCK","PARACHUTE","LAND_","BBARRACKS","_LHD_","_ACR","MASH_","FORT_","BASICWEAPONS","SPECIALWEAPONS","_UAV"];

//return all possible combinations from _classname
possible = [];
for '_i' from 2 to 6 do
{
	_charFront = [_classname,_i] call fn_genStrFront;
	_charBack = [_classname,_i] call fn_genStrBack;
	possible = possible + [toUpper (_charFront)];
	possible = possible + [toUpper (_charBack)];
};

stop = false;
//check if any possible outcomes match a kickable outcome, if true then abort script
{
	if (_x in kickable) exitWith {hint ("ERROR: CHARS\n\n'"+_x+"'\n\nIN CLASSNAME\n\n'"+_classname+"'\n\nWILL KICK"); stop = true;};
} forEach possible;

waitUntil {!(stop)};
hint ("Classname "+_classname+" is OK: Preparing to spawn!");
/*==[Scanning Done]==*/

//lol goodbye exploding car
allunits = [];
publicVariable "allunits";

sleep 0.5;
_dir = getDir player - 90;
_location = player modelToWorld [0,6,0]; //2lazy2doTrig

//whitelist exploit tiem
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];

hint ('Spawning:\n'+_classname);

_tent = _object;
_tent setdir _dir;
_tent setpos _location;
player reveal _tent;
EDIT: Working now...

How can i spawn NPC with loot?
i saw some ppl if they kill them the have loot like 20 weapons and 100 of every magazine?
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us