Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix onVehicleExit doesn't trigger if pulled out #3492

Merged
merged 10 commits into from
Jun 20, 2024

Conversation

Proxy-99
Copy link
Contributor

@Proxy-99 Proxy-99 commented Jun 18, 2024

Fixes #476
on case VEHICLE_NOTIFY_JACK_ABORT:
if (Packet.GetStartedJacking() == 1)
call the events

@Proxy-99 Proxy-99 requested a review from bum8hj June 18, 2024 18:55
Copy link
Contributor

@bum8hj bum8hj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought I'd try reviewing for the first time since this seemed familiar to me.
I didn't test any of this in-game though.

Server/mods/deathmatch/logic/CGame.cpp Outdated Show resolved Hide resolved
Server/mods/deathmatch/logic/CGame.cpp Outdated Show resolved Hide resolved
@Proxy-99 Proxy-99 requested a review from bum8hj June 18, 2024 19:38
@Proxy-99
Copy link
Contributor Author

Thought I'd try reviewing for the first time since this seemed familiar to me. I didn't test any of this in-game though.

you can create a ped then warp it to vehicle to test

 local Ped = createPed ( 252, -2410.63159, -598.80121, 132.64844 )
local Vehicle = createVehicle ( 411, -2418.98706, -605.08325, 132.56250 )  

function warpPad()
warpPedIntoVehicle (Ped, Vehicle,0)  
end

addCommandHandler ('warp', warpPad )

addEventHandler ( "onVehicleExit", getRootElement(), function(driver, leftSeat, jackerPlayer)
		 print(getPlayerName(jackerPlayer))			
end)

addEventHandler ( "onPedVehicleExit", getRootElement(), function(theVehicle, leftSeat, jacker)
	print(getPlayerName(jacker))			
end)

Copy link
Contributor

@bum8hj bum8hj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the script. I tested it before and after your changes.
Seems good to me!

Copy link
Contributor

@Nico8340 Nico8340 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :shipit:

Server/mods/deathmatch/logic/CGame.cpp Outdated Show resolved Hide resolved
Server/mods/deathmatch/logic/CGame.cpp Outdated Show resolved Hide resolved
@tederis tederis added the bugfix Solution to a bug of any kind label Jun 19, 2024
@Proxy-99 Proxy-99 requested a review from tederis June 19, 2024 09:59
@Dutchman101 Dutchman101 merged commit af4f7fa into multitheftauto:master Jun 20, 2024
6 checks passed
MTABot pushed a commit that referenced this pull request Jun 20, 2024
af4f7fa Fix onVehicleExit doesn't trigger if pulled out  (#3492)
@botder botder added this to the 1.6.1 milestone Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Solution to a bug of any kind
Projects
None yet
Development

Successfully merging this pull request may close these issues.

onVehicleExit doesn't trigger if only pulled out of vehicle
6 participants