General > Developers Corner

ULX playsound wont work in script.

<< < (2/2)

BlackSanta:
Hmm, not exactly sure if what I did was right or not, but it still is not working.

Here is the current code:

function checkAlive(ply)
        hook.Call( "checkAlive" )
        if ply:Alive(2) then //Returns Boolean
        duel()
        end   
 
function duel()
  BroadcastLua('surface.PlaySound("1v1.mp3")')
end
       
end

Megiddo:
I suspect you're just attempting to hack something together without really understanding the language. Look at the stickies for help getting started with Lua.

Navigation

[0] Message Index

[*] Previous page

Go to full version