[RELEASE] [C#] PlayCustomSounds - Players, Coordinates and Reduce Volume based on distance!

Hi,

I am not trying to argue with you at all, but I do believe the information you are giving is not factual.

Even after scrolling through the FiveM discord, you’ll see a multitude of messages stating PlayerPedId() is more efficient, and faster.


image

The last screenshot even comes with solid evidence.

Best wishes,
London Studios

4 Likes

GetPlayerPed(-1)
0x6E31E993

(PlayerPedID())
0xD80958FC74E988A6 0xFA92E226

PlayerPedId() calls 2 functions, while GetPlayerPed(-1) is calling a single function.

Also, I am referring to client sided scripting. You don’t need the (-1), it would simply check local player.

Thanks for the additional documentation.

Hi,

I won’t be proceeding further with you in this discussion, the evidence above clearly shows that PlayerPedId() is much more efficient than GetPlayerPed(-1). The evidence can not be argued with…

Best wishes,
London Studios

1 Like

Trying to use this in a Zombie Server. Could someone help me by an chance getting this to work?

Hey,

Amazing script and working but I am having trouble with making the sound 3D.
It seems it sees where is your coords to adjust the volume once which it doesn’t update the the coords to update the volume.
I tried while true but It keeps starting the music again and again.

Thank you!

i tried to play sound using coords but can’t play it. I don’t see any error in my console. Can you help me?

hey, im using the lua “workaround”

sometimes i can hear the sounds and sometimes not. it seems pretty random but i dont know what it is… do you have a clue?

by the way i love this ressource!

regards,

Great job!

Just curious if it’s possible to play the sound on loop? I have a 2 second audio clip and I’d much rather the small file be looped rather than extending it into a 20 minute clip.

Thanks!

How can I add and play a sound when a medic revives someone?