-
Notifications
You must be signed in to change notification settings - Fork 9
GetPlayerWeaponState #41
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
Conversation
amx/server/syscalls.lua
Outdated
-- Someone tell me how can I transfer the value of this vars to the server? | ||
clientCall(player, '_isPedReloadingWeapon', player) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way it would work is that there's an event client-side like onClientPedReload
-- and in that event, sync it to the server. Did you test whether this would work?
I think this function will always return the result of the previous call.
I think we should just try to implement https://wiki.multitheftauto.com/wiki/IsPedReloadingWeapon server-side in MTA
My suggestion for now is that we just never return 3
, and when we've implemented stuff in MTA, we can add the return 3
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should just try to implement https://wiki.multitheftauto.com/wiki/IsPedReloadingWeapon server-side in MTA
I'll be wait it with pleasure!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way it would work is that there's an event client-side like
onClientPedReload
-- and in that event, sync it to the server. Did you test whether this would work?
The part of the code with reloading a gun is working. I have tested it. (You can see it at my screenshot)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no guarantee that the reloading state will be updated between line 2967 and 2968. The event call involves networking with the client and is an asynchronous operation.
Co-authored-by: Qais Patankar <qaisjp@gmail.com>
Co-authored-by: Qais Patankar <qaisjp@gmail.com>
Co-authored-by: Qais Patankar <qaisjp@gmail.com>
Ok. What we will do with it?
I suggest the first variant. |
Comment left on thread -- #41 (comment) I don't think it will work reliably. E.g. over the internet the event call will be too slow |
Okay. Just we leave it without 3 state as you suggested in #41 (comment) |
fix #19