I'm new to lua, and i'm creating a small script with banners and stuff... In one part of my script i want it to play a sound on win... The gamemode is race
function progresskills()
progresskills = guiCreateProgressBar
(20,574,252,22,false)
end
addEventHandler
("onClientResourceStart",getRootElement(),
progresskills)
addEventHandler
("onClientPlayerWasted",getRootElement(), function()
guiProgressBarSetProgress(progresskills, 10) end)
function soundwin()
local sound = playSound("sounds/winner.wav")
setSoundVolume(sound, 1.0) -- set the sound
volume to 100%
end
addEventHandler("?????",getLocalPlayer
(), soundfull)
Where the "????" is by the bottom, i want to know the code i have to type there, for when a player wins.
Thanks for your help