How TO Spawn a Vehicle???

Posts 18 of 8 · Page 1 of 1
How TO Spawn a Vehicle???
Hello to everyone.i want know how span a vehicle like helicopter or something else. code script? thanks
I'm going to laugh my ass off if somebody pulls this off, but from the looks of the game the vehicles are generally part of the level/map and always pull into the same places each time they come.
and about spawn lot gold bag? or money bag? there is a code script?
Quote Originally Posted by Urazfenix88 View Post
and about spawn lot gold bag? or money bag? there is a code script?
Code:
local pos = managers.player:player_unit():position()

function spawn_loot(type, _position, z_offset)
	local position = mvector3.copy(_position)
	if z_offset then mvector3.set_z(position, position.z + z_offset) end
	if Network:is_client() then
		managers.network:session():send_to_host( "server_drop_carry", type, managers.money:get_bag_value( type ), nil, nil, 0, position, Rotation( math.UP, math.random() * 360 ), Vector3( 0,0,0 ), 0 )
	else 
		managers.player:server_drop_carry( type, managers.money:get_bag_value( type ), nil, nil, 0, position, Rotation( math.UP, math.random() * 360 ), Vector3( 0,0,0 ), 0 )
	end
end
	
	spawn_loot("gold", pos, 120)
i found this in the code:

Idstring( "units/payday2/vehicles/air_vehicle_blackhawk/helicopter_cops_ref" )

not sure how one would go about spawning it without crashing the game, still trying to get it to work
Posts 18 of 8 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?