Skip to content

clientside getElementChild triggers onPlayerTriggerEventThreshold #4262

Open
@ffsPLASMA

Description

@ffsPLASMA

Describe the bug

Passing an invalid element pointer to getElementChild on the client causes onPlayerTriggerEventThreshold to be triggered.

Does the client ask the server for a valid element if it cannot find one locally? If so that would be a weird edge case since it gets handled as a remote triggered event.

Steps to reproduce

Run this code on the client, the server should listen to onPlayerTriggerEventThreshold event and will pick the client up:

setTimer(function()
	local uObject = createObject(1337, 0, 0, 0);
	local uObject2 = createObject(1337, 0, 0, 0);
	local uObject3 = createObject(1337, 0, 0, 0);
	
	destroyElement(uObject);
	destroyElement(uObject2);
	destroyElement(uObject3);
	
	local uChildElement = getElementChild(uObject, 0);
	local uChildElement2 = getElementChild(uObject2, 0);
	local uChildElement3 = getElementChild(uObject3, 0);
	
	if(uChildElement) then
		-- mkay??!
	end
end, 5, 0);

Version

Multi Theft Auto v1.6-release-23196
MTA:SA Server v1.6-release-23079

Additional context

No response

Relevant log output

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions