Welcome to Open Carnage

A resource for modders and technology enthusiasts; have a wander to see why we're worth the time! EST. 2012

Vic Firth

Show Rider Names v2 On Bigass Final

I think this is a great script and I am trying to get it to work on Bigass Final on a Halo MD/PC Server.

With Warthogs it works perfectly.
With the mongoose, it shows only one persons name and it shows it in both slots.
For the Spade and Falcon, it does not show anything.

Can anyone help me make this script work for all the vehicles of bigass final?

show_rider_names_v2.lua

Share this post


Link to post
Share on other sites

Members of Open Carnage never see off-site ads.

Ok So I am looking at this part of the script.

 

function OnVehicleEnter(PlayerIndex, Seat)
	if player_present(PlayerIndex) then	
		local player_object = get_dynamic_player(PlayerIndex)
		local player_object_id = read_dword(get_player(PlayerIndex) + 0x34)	
		local vehicle_id = read_dword(player_object + 0x11C)
		if (player_object ~= 0) then
			if (vehicle_id ~= 0xFFFFFFFF) then
				if (vehicles[vehicle_id] == nil) then
					vehicles[vehicle_id] = {}
				end	
				local veh_obj = get_object_memory(vehicle_id)
				if (veh_obj ~= 0) then
					if (Seat == "0") then
						player_seat[PlayerIndex].vehicleid = vehicle_id
						player_seat[PlayerIndex].seat = 0
						player_seat[PlayerIndex].vehobj = veh_obj
						vehicles[vehicle_id].driver = PlayerIndex							
					elseif (Seat == "1") then
						write_dword(veh_obj + 0x32C, player_object_id)	
						player_seat[PlayerIndex].vehicleid = vehicle_id
						player_seat[PlayerIndex].seat = 1
						player_seat[PlayerIndex].vehobj = veh_obj
						vehicles[vehicle_id].passenger = PlayerIndex
					elseif (Seat == "2") then
						player_seat[PlayerIndex].vehicleid = vehicle_id
						player_seat[PlayerIndex].seat = 2
						player_seat[PlayerIndex].vehobj = veh_obj
						vehicles[vehicle_id].gunner = PlayerIndex				
					end
					showplayers = timer(34, "Show_Players", vehicle_id)
				end	
			end		
		end	
	end		
end


I was wondering if instead of looking up by vehicle ID, I cange it to look up by vehicle tag path , would this work? Such as how it is written in @giraffe
Vitality settings script? That way I could specify which vehicles I wanted it to work for.

 

if(type(v.tag_path) == "string" and type(v.tag_type) == "string") then
			if(v.tag_type == "vehi" or v.tag_type == "bipd") then
				local unit_tag = lookup_tag(v.tag_type, v.tag_path)
				if(unit_tag ~= 0) then
					local unit_meta = read_dword(unit_tag + 0xC)
					local unit_data = read_dword(unit_tag + 0x14)
					local collision_meta = read_dword(unit_data + 0x7C)
					if(collision_meta ~= 0xFFFFFFFF) then
						local collision_tag = lookup_tag(collision_meta)
						if(collision_tag ~= 0) then
							local collision_data = read_dword(collision_tag + 0x14)



Would something like this even work?

Share this post


Link to post
Share on other sites

Well I have just given up on this, I think the coding is just too over my head. I would still love to have it working correctly on more vehicles. Maybe its not possible. If anyone is reading this and can/wants to help, that would be very greatly appreciated. Thank you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.