Jump to content

ColShape Problem


=RM=Mario

Recommended Posts

Alright,so i made this script to when you enter area in the desert for a DM map music would play,But when i start resource music plays no matter where on the map im at,i want the music to play when you Enter the col shape and, for it to turn off when you leave it,but isn't working,Thanks for help in Advance

DesertMusic = playSound("Music.ogg", true)
setSoundVolume(music,0)
 
col = createColRectangle  (-33.328407287598, 2004.6947021484, 17.640625,50)
 
function EnterDesert(theElement, matchingDimension )
if ( theElement == getLocalPlayer() ) then
	setSoundVolume(music,1)
end
end
addEventHandler ( "onClientColShapeHit", col, EnterDesert)
 
function LeaveDesert(theElement, matchingDimension)
if ( theElement == getLocalPlayer() ) then
	setSoundVolume(music,0)
end
end
addEventHandler("onClientColShapeLeave",col,LeaveDesert)

Link to comment

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...