AvarianKnight / pma-voice

An easy drag n' drop resource that gives you a wrapper to use FiveM's built-in mumble voice.
MIT License
226 stars 196 forks source link

Added an export function to allow changing the default animation. #487

Open Swellington-Soares opened 2 months ago

Swellington-Soares commented 2 months ago

Addition of an exports function to enable the use of custom animation directly in the script, thus eliminating external means of doing the same thing, taking advantage of what the script already offers.

AvarianKnight commented 2 months ago

This seems like something that should be a ConVar, not an export.

Swellington-Soares commented 2 months ago

This seems like something that should be a ConVar, not an export.

I also thought about this, but on the other hand the server dev may want to create a script that allows, for example, the user to choose the custom animation from a list. That's why I put it as exports.

AvarianKnight commented 1 month ago

You missed a call under this to free the animation when its no longer needed

if shouldPlayAnimation then
  RemoveAnimDict('random@arrests')
end
AvarianKnight commented 1 month ago

You missed a call under this to free the animation when its no longer needed

if shouldPlayAnimation then
  RemoveAnimDict('random@arrests')
end
Swellington-Soares commented 1 month ago

I believe this time it fixes it.

AvarianKnight commented 1 month ago

Just a bump here, didn't forget about this, just need to test this along side other changes I have stashed away :)

stale[bot] commented 13 hours ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.