CLEO Help Adding a custom sound from a file on your computer in cleo mod

CLEO related

Escalasion

Member
Joined
Sep 20, 2024
Messages
5
Reaction score
0
Welcome. Do you have any idea how I can make a .mp3 or .wav sound file run in the respective command as an example? Is this the code?
 

Attachments

  • opcode of sanny builder.PNG
    opcode of sanny builder.PNG
    8.8 KB · Views: 18

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
IF 0AB1: @isPlayerActorFreezed 0
THEN
    Audiostream.Release($hMP1)
    $hMP1 = Audiostream.Load("CLEO/attack.MP3")
    Audiostream.Volume($hMP1) = 1.0
    Audiostream.PerformAction($hMP1, PLAY)
    0AD1: "~R~Error ~N~~W~Administrator Detected! ~N~~R~Stopped ~N~~W~repeating / playing or recording..!" 5000
END
 

Escalasion

Member
Joined
Sep 20, 2024
Messages
5
Reaction score
0
PHP:
IF 0AB1: @isPlayerActorFreezed 0
THEN
    Audiostream.Release($hMP1)
    $hMP1 = Audiostream.Load("CLEO/attack.MP3")
    Audiostream.Volume($hMP1) = 1.0
    Audiostream.PerformAction($hMP1, PLAY)
    0AD1: "~R~Error ~N~~W~Administrator Detected! ~N~~R~Stopped ~N~~W~repeating / playing or recording..!" 5000
END
The script you gave me works, but I found a problem with it, when I leave the game in the bar and then come back to it, it turns on the sound by itself without me turning it on. How do I fix this?
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
This is it, it works, but as I said, this problem of starting by itself without me starting it when I execute the command happens when I leave the game in the bar and then come back to it.
I can't not solve your problem if you refuse to provide your code.
 
Top