Jump to content

[Help]Need help about meta.xml and my map


CMehmed

Recommended Posts

Here is meta

    "hsm.mp3" /> 
    

Client .lua

  
function ClientStarted () 
    setWaterColor( 0 , 213, 255 ) 
    setSkyGradient( 24, 100, 100, 255, 102, 0 ) 
  
  
end  
  
addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), ClientStarted ) 

Music.lua

function startMusic() 
    setRadioChannel(0) 
    song = playSound("hsm.mp3",true) 
    outputChatBox("[Music] Press z to stop / start music.",getRootElement(),255,255,255,true) 
end 
  
function makeRadioStayOff() 
    setRadioChannel(0) 
    cancelEvent() 
end 
  
function toggleSong() 
    if not songOff then 
        setSoundVolume(song,0) 
        songOff = true 
        removeEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) 
    else 
        setSoundVolume(song,1) 
        songOff = false 
        setRadioChannel(0) 
        addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) 
    end 
end 
  
addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),startMusic) 
addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) 
addEventHandler("onClientPlayerVehicleEnter",getRootElement(),makeRadioStayOff) 
addCommandHandler("musicmusic",toggleSong) 
bindKey("z","down","musicmusic") 
addEventHandler("onClientResourceStop",getResourceRootElement(getThisResource()),startMusic) 

Link to comment
  • Moderators

Well then there isn't anything wrong with the source......

Go to your server, login as admin, write /debugscript 3, start the map.

and tell me why it doesn't start.

If you can't tell me what went wrong, I can't help you.

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