Jump to content

Play sound while in afk zone


Albinioli

Recommended Posts

Posted (edited)

Well i got this from the wiki

function wasted (killer, weapon, bodypart)
 local sound = playSound("sounds/wasted.mp3")
 setSoundVolume(sound, 0.5)
end

addEventHandler("onClientPlayerWasted", localPlayer, wasted)

But i want it to make it to play a music while im entering the afk zone or something like that is there anyone that can help me ?

Cause im realy newbie in scripting

Edited by Albinioli
Posted

Use a col rectangle to give an area for the afk zone, then use onColShapeHit to trigger the music. when leaving it you can remove it

Nothing is impossible when you acquire the knowledge
 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...