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

Server side weapon reloading #3936

Merged
merged 7 commits into from
Jan 10, 2025
Merged

Conversation

Nico8340
Copy link
Contributor

@Nico8340 Nico8340 commented Jan 9, 2025

Description

This pull request enhances the synchronization of weapon reloading for both peds and player with making it server sided. Refactors existing functions, introduces a new one, and adds two new events as well. Closes #1525.

Function

POP:

bool isPedReloadingWeapon(element ped)

OOP:
Method: ped:isReloadingWeapon()
Variable ped.reloadingWeapon

Events

"onPedWeaponReload"
"onPlayerWeaponReload"

Example

reloadtest.zip

Server/mods/deathmatch/logic/CPed.h Outdated Show resolved Hide resolved
Server/mods/deathmatch/logic/CPed.cpp Outdated Show resolved Hide resolved
Shared/sdk/net/SyncStructures.h Outdated Show resolved Hide resolved
Nico8340 and others added 4 commits January 9, 2025 18:50
Co-authored-by: Marek Kulik <noreply@bug32.com>
Co-authored-by: Marek Kulik <noreply@bug32.com>
@Nico8340 Nico8340 requested a review from botder January 10, 2025 05:23
@Nico8340 Nico8340 requested a review from tederis January 10, 2025 07:06
@botder botder merged commit e71f482 into multitheftauto:master Jan 10, 2025
6 checks passed
@botder botder added the enhancement New feature or request label Jan 10, 2025
@botder botder added this to the 1.6.1 milestone Jan 10, 2025
@Nico8340 Nico8340 deleted the reloading branch January 10, 2025 20:22
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.

Serverside for isPedReloadingWeapon
3 participants