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

Add isObjectMoving to server side #3378

Merged
merged 5 commits into from
May 23, 2024

Conversation

FileEX
Copy link
Contributor

@FileEX FileEX commented May 1, 2024

This PR adds the isObjectMoving function also on the server side, making it available as a shared function.

Test server-side code

local object

addCommandHandler('obj', function(plr,cmd)
	local x,y,z = getElementPosition(plr);
	object = createObject(1337, x,y,z);

	moveObject(object, 20*1000, 0,0,5);
end);

addCommandHandler('objm', function(plr,cmd)
	print(isObjectMoving(object));
end);

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 to me

Copy link
Contributor

@TracerDS TracerDS left a comment

Choose a reason for hiding this comment

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

Your commitment is extraordinary, good job!

@Lpsd
Copy link
Member

Lpsd commented May 23, 2024

Please add the relevant wiki page for this, including the "new feature" template (once the nightly build has been created).

See other functions/events - for example: https://wiki.multitheftauto.com/wiki/OnPlayerProjectileCreation

@Lpsd Lpsd merged commit 7c939ad into multitheftauto:master May 23, 2024
6 checks passed
MTABot pushed a commit that referenced this pull request May 23, 2024
@FileEX FileEX deleted the shared/isObjectMoving branch May 23, 2024 18:13
@TheNormalnij TheNormalnij added this to the 1.6.1 milestone May 25, 2024
@TheNormalnij TheNormalnij added the enhancement New feature or request label May 25, 2024
MegadreamsBE pushed a commit to MegadreamsBE/mtasa-blue that referenced this pull request Jun 6, 2024
* Added isObjectMoving to server side

* Remove unnecessary definition

* Add missing OOP variable

* Change NULL to nullptr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants