Jump to content

Beluga

Members
  • Posts

    48
  • Joined

  • Last visited

Everything posted by Beluga

  1. Beluga

    Bad argument

    addEvent("registerPlayer",true) addEventHandler("registerPlayer",getRootElement(), function(username,password) local xmlFile = xmlLoadFile("players.xml") local playerNode = xmlFindChild(xmlFile,"players",0) if (playerNode) then xmlCreateChild(playerNode,tostring(username)) else xmlCreateChild(xmlFile,"players") end end) This code gives two WARNING: Bad argument errors: Bad argument @ 'xmlNodeFindChild' - line: 5 Bad argument @ 'xmlCreateChild' - line: 9 Someone can help me with this?
  2. Beluga

    Fade

    Hmm I checked it but I don't really how to use it to slowly fade in/out.
  3. Beluga

    Fade

    bindKey ("m","down", function(key,state) if (guiGetVisible (gameWindow) == false) then guiSetVisible (gameWindow,true) showCursor (true,true) else guiSetVisible (gameWindowWindow,false) showCursor (false,false) end end end) I got his code now. If I press "M" it shows "gameWindow" but I was searching on the wiki and couldn't find anything about slowly fade in. So my question is: Somebody can help me with making this: If I press "M" the "gameWindow" slowly fade in and when I press again it slowly fade out again. P.s I tried something with guiGetAlpha and guiSetAlpha but It didn't helped. function openMenu() local menu = guiGetVisible(gameWindow) if menu == false then local currentAlpha = guiGetAlpha(gameWindow) local newAlpha = currentAlpha - 4 if newAlpha < 0 then newAlpha = 0 end guiSetAlpha(gameWindow,newAlpha) if newAlpha ~= 0 then setTimer(openMenu, 50, 1) end elseif menu == true then local currentAlpha = guiGetAlpha(gameWindow) local newAlpha = currentAlpha + 4 if newAlpha > 255 then newAlpha = 255 end guiSetAlpha(gameWindow,newAlpha) if newAlpha ~= 255 then setTimer(openMenu,50,1) end end end bindKey("m","down",openMenu)
  4. I think if this is the full code, it is definetely copied. Look like the GUI...
  5. Beluga

    Two problems!

    Really thank you! One last question: how to do -? cause if I add - between tonumbers he can't find that(it isn't darkblue colored) //EDIT: Sorry did something wrong, everything is ok now! Thanks
  6. Beluga

    Two problems!

    With this code it don't shows errors but it shows as result ìt shows the text: "value .. + ..value1" not the number of the values. If I delete the "" things it have this errors: unexpected symbol near '+' (line 47) and 3x: '' expected near 'end' (line 48, line 49, line 50)
  7. Beluga

    Two problems!

    calculatorScreen = guiCreateWindow(0.54654,0.111,0.27,0.8,"Calculator",true) guiSetVisible(calculatorScreen,false) calculatorDisplay = guiCreateEdit(0.05,0.109,0.79,0.125,"",true,calculatorScreen) guiEditSetReadOnly(calculatorDisplay,true) calculatorDisplay1 = guiCreateEdit(0.05,0.24,0.79,0.125,"",true,calculatorScreen) guiEditSetReadOnly(calculatorDisplay1,true) calculatorDisplay2 = guiCreateEdit(0.85123,0.109,0.1,0.257,"",true,calculatorScreen) guiEditSetReadOnly(calculatorDisplay2,true) guiBringToFront(calculatorDisplay2) calculatorCloseButton = guiCreateButton(0.87,0.05,0.0741,0.0377,"x",true,calculatorScreen) calculatorMinimizeButton = guiCreateButton(0.7952,0.05,0.0741,0.0377,"-",true,calculatorScreen) calculator1 = guiCreateButton(0.01,0.38,0.2,0.112,"1",true,calculatorScreen) calculator2 = guiCreateButton(0.25,0.38,0.2,0.112,"2",true,calculatorScreen) calculator3 = guiCreateButton(0.46,0.38,0.2,0.112,"3",true,calculatorScreen) calculator4 = guiCreateButton(0.01,0.50,0.2,0.112,"4",true,calculatorScreen) calculator5 = guiCreateButton(0.25,0.50,0.2,0.112,"5",true,calculatorScreen) calculator6 = guiCreateButton(0.46,0.50,0.2,0.112,"6",true,calculatorScreen) calculator7 = guiCreateButton(0.01,0.62,0.2,0.112,"7",true,calculatorScreen) calculator8 = guiCreateButton(0.25,0.62,0.2,0.112,"8",true,calculatorScreen) calculator9 = guiCreateButton(0.46,0.62,0.2,0.112,"9",true,calculatorScreen) calculator0 = guiCreateButton(0.25,0.74,0.2,0.112,"0",true,calculatorScreen) calculatorPlus = guiCreateButton(0.72,0.38,0.2,0.112,"+",true,calculatorScreen) calculatorMin = guiCreateButton(0.72,0.50,0.2,0.112,"-",true,calculatorScreen) calculatorEqual = guiCreateButton(0.72,0.74,0.2,0.112,"=",true,calculatorScreen)
  8. Beluga

    Two problems!

    I'm making a calculator, but I have 2 problems with it. The first problem is the = button. If I press the = button it shows in display1: value .. + .. value1. but I wanted to let the calculator shows a number (the result) Here is the code (the = button is the last one (name of the button is calculatorEqual)): addEventHandler("onClientGUIClick",getRootElement(), function(button,state,absx,absy) if(source == calculatorCloseButton) then guiSetVisible(calculatorScreen,false) guiSetVisible(computerScreenTabPanelCalcButton,false) guiSetText(calculatorDisplay,"") guiSetText(calculatorDisplay1,"") guiSetText(calculatorDisplay2,"") elseif(source == calculatorMinimizeButton) then guiSetVisible(calculatorScreen,false) guiSetVisible(computerScreenTabPanelCalcButton,true) elseif(source == calculator1) then addIntoCalculatorEditDisplay("1") elseif(source == calculator2) then addIntoCalculatorEditDisplay("2") elseif(source == calculator3) then addIntoCalculatorEditDisplay("3") elseif(source == calculator4) then addIntoCalculatorEditDisplay("4") elseif(source == calculator5) then addIntoCalculatorEditDisplay("5") elseif(source == calculator6) then addIntoCalculatorEditDisplay("6") elseif(source == calculator7) then addIntoCalculatorEditDisplay("7") elseif(source == calculator8) then addIntoCalculatorEditDisplay("8") elseif(source == calculator9) then addIntoCalculatorEditDisplay("9") elseif(source == calculator0) then addIntoCalculatorEditDisplay("0") elseif(source == calculatorPlus) then local text = guiGetText(calculatorDisplay1) guiSetText(calculatorDisplay,text) guiSetText(calculatorDisplay1,"") guiSetText(calculatorDisplay2,"+") elseif(source == calculatorMin) then local text = guiGetText(calculatorDisplay1) guiSetText(calculatorDisplay,text) guiSetText(calculatorDisplay1,"") guiSetText(calculatorDisplay2,"-") elseif(source == calculatorEqual) then local value = guiGetText(calculatorDisplay) local value1 = guiGetText(calculatorDisplay1) local result = guiGetText(calculatorDisplay2) if result == "+" then guiSetText(calculatorDisplay1,"value .. + .. value1") end end end) //I tried to delete the "" things but then I got some errors in MTA Script Editor. My second problem is the marker. The problem is: When I hit the marker, the calculator pop up at the screen of an other player. Here is the code: function markerHit (hitPlayer, matchingDimension) if (source == calculatorMarker) then guiSetVisible(calculatorScreen,true) showCursor(true,true) end end addEventHandler ("onClientMarkerHit",getRootElement(),markerHit) Thanks for your help!
  9. Beluga

    Window opening

    It is fixed now Thanks for your help!
  10. Beluga

    Window opening

    Look my MTA Script Editor don't show any errors. //EDIT :: Hmm it is strange but I restart MTA Script Editor and now he shows errors.
  11. Beluga

    Window opening

    MTA Script Editor don't shows any errors.
  12. Beluga

    Window opening

    http://easy-upload.nl/f/j5HI1TSa I uploaded it to that site
  13. Beluga

    Window opening

    I have it on client side, It must be something else in the script.
  14. I made a script that should open a window, create image and setCameraMatrix but those things aren't happened. The screen keep staying black? Someone can help me. loginWindow = guiCreateWindow(0.35875,0.285,0.28375,0.4167,"Welcome to The Friend Mode v0.1 BETA",true) toggleControl ("chatbox",false) guiWindowSetMovable(loginWindow,false) guiWindowSetSizable(loginWindow,false) loginWindowUsernameLabel = guiCreateLabel(0.0352,0.108,0.859,0.112,"Username",true,loginWindow) guiLabelSetColor(loginWindowUsernameLabel,255,255,255) guiLabelSetVerticalAlign(loginWindowUsernameLabel,"center") guiLabelSetHorizontalAlign(loginWindowUsernameLabel,"left",false) loginWindowUsernameEdit = guiCreateEdit(0.0749,0.248,0.8238,0.124,"",true,loginWindow) guiEditSetMaxLength(loginWindowUsernameEdit,20) loginWindowPasswordEdit = guiCreateEdit(0.0749,0.54,0.8238,0.124,"",true,loginWindow) guiEditSetMasked(loginWindowPasswordEdit,true) guiEditSetMaxLength(loginWindowPasswordEdit,20) loginWindowPasswordLabel = guiCreateLabel(0.0352,0.396,0.8062,0.12,"Password",true,loginWindow) guiLabelSetColor(loginWindowPasswordLabel,255,255,255) guiLabelSetVerticalAlign(loginWindowPasswordLabel,"center") guiLabelSetHorizontalAlign(loginWindowPasswordLabel,"left",false) loginWindowLoginButton = guiCreateButton(0.0441,0.704,0.9031,0.108,"Log in!",true,loginWindow) loginWindowRegisterButton = guiCreateButton(0.0441,0.836,0.9031,0.108,"Register",true,loginWindow) showCursor (true,true) showChat (false) setCameraMatrix (-2770.24,-1133.92,38.14,-2881.06,-907.75,9.301) showPlayerHudComponent ("radar",false) fadeCamera (true,2.5) widescreenImage = guiCreateStaticImage(0,0,1,1,"widescreen.png",true,getRootElement()) guiMoveToBack (widescreenImage)
  15. Beluga

    Problems

    The problem is solved. I downloaded MTA 1.0.3 and the problems are gone now.
  16. Beluga

    Problems

    I installed newest version: mtasa-1.0.4-rc-2047-20101025 Didn't worked.
  17. Beluga

    Problems

    I don't know, I just have the "download" one at the homepage!
  18. Beluga

    Problems

    Nothing, the only thing I did was adding some selfmade scripts to resources. But after reinstalling they were gone.
  19. Beluga

    Problems

    I have MTA 1.0.4 but I have some problems with it. Two months ago I didn't have these problems. -Sometimes MTA don't react anymore at loading screen. -Always when I try to click "Connect" button in browser list my game don't react anymore. -Always when I use "Quick Connect" my game don't react anymore. |--> So I can't connect any servers anymore -When I click "Host Game" my game don't react anymore. I tried reinstalling Multi Theft Auto but don't work. I tried reinstalling Grand Theft Auto: San Andreas but don't work. Somebody can help me?
  20. Beluga

    HTTP

    Before I updated it worked on previous version but I downloaded previous version now and there it isn't working anymore too. EDIT By Beluga: //I try to reinstall GTA: SA. and after that reinstall MTA again.
  21. Beluga

    HTTP

    Didn't work. My OS is: Windows Vista Home Premium. Service Pack 2.
  22. Beluga

    HTTP

    I restarted my PC, Don't work! I changed my port to 22007 Now I get this error, , this is the same error with other port ------------------------------------------------------------------------------------------- ERROR: Could not start HTTP server on interface 'IP' port: '22007'! Server stopped! Closing SQLite3 database -------------------------------------------------------------------------------------------
  23. Beluga

    HTTP

    Hi, Today I updated my Multi Theft Auto: San Andreas to r2033. I always run my server at my computer but when I start the server now it gives me an error: ------------------------------------------------------------------------------------------- ERROR: Could not start HTTP server on interface 'IP' port: '22005'! Server stopped! Closing SQLite3 database ------------------------------------------------------------------------------------------- I didnt change anything, I only updated Multi Theft Auto! Can someone help me? Greetz, Beluga
×
×
  • Create New...