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

setPedOnFire(ped, false) doesn't cancel TASK_SIMPLE_PLAYER_ON_FIRE #3249

Open
1 task done
haron4igg opened this issue Nov 24, 2023 · 0 comments
Open
1 task done

setPedOnFire(ped, false) doesn't cancel TASK_SIMPLE_PLAYER_ON_FIRE #3249

haron4igg opened this issue Nov 24, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@haron4igg
Copy link

Describe the bug

Curently if player steps on fire - there is no way to cancel 'On fire' state.
even if you set 'setPedOnFire(ped, false)' this will not cancel TASK_SIMPLE_PLAYER_ON_FIRE.
And while this task is active - player is not able to use Sniper Rifle, or chainsaw.

Expected behaviour obviousy would be to stop TASK_SIMPLE_PLAYER_ON_FIRE when setPedOnFire(ped, false) is executed.

Idially would be to have event: onClientPedSetOfFire which could be canceled, so prevent ped from ignition completelly, because
even if we able to cancel fire, ignition will already cancel sniper rifle aim, or chainsaw attack.

Steps to reproduce

  1. Run this script:
addEventHandler("onClientPreRender", root, function ()
	local wasOnFire = isPedOnFire(localPlayer)

	local x,y,z = getElementPosition(localPlayer)
	extinguishFire(x,y,z,2)

	iprint("wasOnFire", wasOnFire)
	if wasOnFire then
		setPedOnFire(localPlayer, false)
		iprint("isOnFire", isPedOnFire(localPlayer))
		iprint("Task", getPedTask ( getLocalPlayer(), "secondary", 4 ))
	end
end)
  1. Ignite your self.

Version

Client: Multi Theft Auto v1.6-release-22293
Server: MTA:SA Server v1.6-release-21852

Additional context

https://youtu.be/_eULbMsWnss

Relevant log output

No response

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.
@haron4igg haron4igg added the bug Something isn't working label Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant