Jump to content

meta settings issue


Recommended Posts

If i want to change something into meta.xml file

should i use

fileWrite 

?

ok i want to use it after click on a button

like this

server side

    addEvent("thebutton1", true) 
    function thebutton1() 
    destroyElement( Marker2 ) 
    end 
    addEventHandler('thebutton1',getRootElement(),thebutton1) 
     
    addEvent("thebutton2", true) 
    function thebutton2() 
    destroyElement( Marker2 ) 
    end 
    addEventHandler('thebutton2',getRootElement(),thebutton2) 

client side

    function closethewindow() 
    if ( source == GUIEditor_Button[3] ) then 
    guiSetVisible(GUIEditor_Window[2], false) 
    showCursor(false) 
    guiSetInputEnabled(false) 
    triggerServerEvent("thebutton1", getRootElement()) 
    outputChatBox(" now go take this house", getRootElement(), 255,255,0 ) 
     
    elseif 
    ( source == GUIEditor_Button[4] ) then 
    guiSetVisible(GUIEditor_Window[2], false) 
    showCursor(false) 
    guiSetInputEnabled(false) 
    triggerServerEvent("thebutton2", getRootElement()) 
    outputChatBox(" now go take this house !!! ", getRootElement(), 255,255,0 ) 
    end 
    end 
 addEventHandler('onClientGUIClick', root, closethewindow) 

this is 2 buttons on 2 tabs

so .. i want here to make fileWrite happens after this

    function thebutton1() 
    destroyElement( Marker2 ) 
     fileWrite("meta.xml", "anything here") 
    end 
    addEventHandler('thebutton1',getRootElement(),thebutton1) 
     
    addEvent("thebutton2", true) 
    function thebutton2() 
    destroyElement( Marker2 ) 
    fileWrite("meta.xml", "anything here") 
    end 
    addEventHandler('thebutton2',getRootElement(),thebutton2) 

but i don't want the meta.xml only

" anything here "

here's the meta.xml file

        
            "#minplayers" value="[ 0 ]">
            "#maxplayers" value="[ 128 ]">
            "#gravity" value="[ 0.008000 ]">
            "#weather" value="[ 0 ]">
            "#time" value="6:0">
            "#locked_time" value="[ false ]">
            "#waveheight" value="[ 0 ]">
            "#gamespeed" value="[ 1 ]">
        
        "maps/MAKR1.map" dimension="0">
        

actually i want to change time to 00:00 into the meta file

but not to use

setTime 

function

suppose i do like this

    function thebutton1() 
   destroyElement( Marker2 ) 
    fileWrite("meta.xml", "" value="00:00">") 
    end 
    addEventHandler('thebutton1',getRootElement(),thebutton1) 
     
    addEvent("thebutton2", true) 
    function thebutton2() 
    destroyElement( Marker2 ) 
    fileWrite("meta.xml", "" value="00:00">") 
    end 
    addEventHandler('thebutton2',getRootElement(),thebutton2) 

if there are an otherwise i would be thankful if you told me here.

Edited by Guest
Link to comment

hmm i used it like this TAPL

function thebutton1() 
   destroyElement( Marker2 ) 
    set ("#time", 00:00) 
    end 
    addEventHandler('thebutton1',getRootElement(),thebutton1) 

it worked but i want to set time when i press on the button not when the resource start :\

Link to comment
you could use the
set 
get 

functions anytime, not only on resource start.

    get ( "#time" ) 
    set ( "#time", 00:00 ) 

how about this

..

i see the time suddenly changed when i restarted the gamemode .. but i want it if i press the button

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