Jump to content

Montis.

Members
  • Posts

    17
  • Joined

  • Last visited

Posts posted by Montis.

  1. You have to add the mp3 file in the meta.xml and add a command like /playsong [1/2/3] where 1-2-3 are the song's id :D

    First thing i'm not very good in lua scripting(newbie). You have to add the mp3 file in the meta.xml I know it. But I just don't know how to create it in script.

  2. Hi. I have this script how can I add more songs?

    function startMusic() 
        setRadioChannel(0) 
        song = playSound("music2.mp3",true) 
        outputChatBox("#ffffff* #C0FF3ETurn on/off Music Using #FFFFFF\"M\"",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("m","down","musicmusic") 
    addEventHandler("onClientResourceStop",getResourceRootElement(getThisResource()),startMusic) 
    

  3. Hello I download resource reg log system and when I insert something in gui table and press button nothing happens this with all systems reg log.

    And I get error:

    [2012-02-06 17:16:08] WARNING: login\script.lua:42: Access denied @ 'addAccount'

    [2012-02-06 17:16:08] WARNING: login\script.lua:43: Bad argument @ 'logIn' [Expected account at argument 2, got nil]

    Sorry for my bad english.

  4. I try this script:

    function skinas(thePlayer,command) 
    local skin = getPedSkin( thePlayer ) 
        outputChatBox ( "Tavo skin id: " ..tostring(skin).."!"  ) 
    end 
    addCommandHandler ( "skinas",skinas) 
    

    And result: Tavo skin id: 126!

  5. I create command but when I use command nothing happen.

    Script:

    function Skinas(commandName) 
        outputChatBox ( "Tavo skin id: " .. getPedSkin ( getLocalPlayer() ) ) 
    end 
    addCommandHandler ( "skin",Skinas) 
    

  6. Hi i just created simple command and i need put player in car how can i do it?

    My command:

    function SukuriameMasina(thePlayer, command) 
        local x, y, z = getElementPosition(thePlayer) 
        local Masina = createVehicle ( 411, 0, 0, 0 )  
        spawnVehicle ( Masina, x+3, y+3, z ) 
        outputChatBox("Masina sukurta", thePlayer) 
    end 
    addCommandHandler("masina",SukuriameMasina) 
    

  7. To be able to compile a script it must have no errors, debug your script before try to compile it.

    How can i debug srcipt? I know i can compile with f5 but how debug script?

    Sorry for my bad english ;D

  8. You can't compile a script that is enconded with UTF-8, you must change the encoding to UTF-8 without BOM.

    Ok I changed UTF-8 in UTF-8 without BOM with notepad++ program and i compile the script with lua program and i get error:

    Runtime Error at line -1:

    ...amemodes]/[tdm]/scoreboard/tdma_scoreboard_stats.lua:37:

    attempt to call global 'getThisSource'(a nil value)

×
×
  • Create New...