Jump to content

Remp

Members
  • Posts

    210
  • Joined

  • Last visited

Everything posted by Remp

  1. sidepanel? what type of GUI element is it?
  2. this line will cause problems if not id == 447 or id == 460 or id == 472 or id == 473 or id == 493 or id == 595 or id == 480 or id == 430 or id == 453 or id == 452 or id == 446 or id == 454 then not exactly sure what you want to do, but if you want it to stop those ids respawning then youd use if id~=447 and id~= 460 and id~=472... alternatively if you want to only allow those ids to respawn use if id==447 or id==460 or id==472...
  3. Remp

    Button parents

    replace addEventHandler ("onClientGUIClick",registerok,CallForRegister) addEventHandler ("onClientGUIClick",back,ReturnMainWind) with addEventHandler ("onClientGUIClick",registerok,CallForRegister,false) addEventHandler ("onClientGUIClick",back,ReturnMainWind,false)
  4. new version released which fixes a few small bugs and adds a new "offset" option allowing you to input x,y values and offset elements positions from each other with that distance by left clicking on them https://community.multitheftauto.com/index.html?p ... ils&id=141
  5. add outputChatBox() messages inside the function to see where it is failing, for example function checkWater() outputChatBox("checkWater called") for _, veh in pairs( getElementsByType( "vehicle" ) ) do outputChatBox("loop all the vehicles") if not getVehicleOccupant( veh ) then outputChatBox("empty vehicle") local vehID = getVehicleID( veh ) ... then judging by which messages get output you can track down the error id also suggest reading this http://development.mtasa.com/index.php?title=Debugging
  6. you wernt already using it server side...? whats that timer doing in the middle of nowhere, put it in onResourceStart and add chat outputs to see where the function fails
  7. just change local waterZ = getWaterLevel( getElementPosition( veh ) ) if waterZ and waterZ > z then blowVehicle( veh ) end to if 0.0 > z then blowVehicle( veh ) end
  8. getWaterLevel is a client side function
  9. the basic way would be to check the z coord against the water level, assuming there arnt any places in the map on land below water level alternatively you could use testLineAgainstWater
  10. addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),displayMainPlate)
  11. ... setTimer ( function() stufftest() ... ... end , 120000, 0) ...
  12. they dont need to have different names, call them all "stuff" and the index will indicate which one to read also, the index starts at 0 not 1 xmlInfoNode = xmlFindSubNode(xmlInfo, "stuff", math.random(0, 2)) ... <root> <stuff>read out from xml file, stuff1</stuff> <stuff>read out from xml file, stuff2, YEA!!</stuff> <stuff>and FINALY: read out from xml file, stuff3</stuff> </root>
  13. they dont need to have different names, call them all "stuff" and the index will indicate which one to read also, the index starts at 0 not 1 xmlInfoNode = xmlFindSubNode(xmlInfo, "stuff", math.random(0, 2)) ... read out from xml file, stuff1read out from xml file, stuff2, YEA!!and FINALY: read out from xml file, stuff3
  14. look at the wiki page for xmlFindSubNode xmlFindSubNode ( xmlnode parent, string subnode, int index ) so, based on that, this will search for a subnode of xmlInfo called "name" at a random index xmlInfoNode = xmlFindSubNode(xmlInfo, "name", math.random(min, max))
  15. look at the wiki page for xmlFindSubNode xmlFindSubNode ( xmlnode parent, string subnode, int index ) so, based on that, this will search for a subnode of xmlInfo called "name" at a random index xmlInfoNode = xmlFindSubNode(xmlInfo, "name", math.random(min, max))
  16. the second argument of xmlFindSubNode should be a string, math.random returns an integer in your case it should be xmlInfoNode = xmlFindSubNode(xmlInfo, "name of subnode", math.random(stuff1, stuff3))
  17. the second argument of xmlFindSubNode should be a string, math.random returns an integer in your case it should be xmlInfoNode = xmlFindSubNode(xmlInfo, "name of subnode", math.random(stuff1, stuff3))
  18. do you mean align it to the left\right (see here) or do you mean constanlty move it back and forth?
  19. do you mean align it to the left\right (see here) or do you mean constanlty move it back and forth?
  20. with the exception of the command to start/stop the editor it is all controlled with GUI already (right click menus)
  21. with the exception of the command to start/stop the editor it is all controlled with GUI already (right click menus)
  22. ive been unable to find any reason for setting the variable to cause it to break like that, however i found a (quite large) bug with the deletion code which could have caused what you are describing. Hopefully fixing that will sort out your problem new version uploaded: https://community.multitheftauto.com/index.html?p ... ils&id=141
  23. ive been unable to find any reason for setting the variable to cause it to break like that, however i found a (quite large) bug with the deletion code which could have caused what you are describing. Hopefully fixing that will sort out your problem new version uploaded: https://community.multitheftauto.com/index.html?p ... ils&id=141
  24. eAi: by its very nature a GUI editor would require as much free screen real estate as possible to work with, i just didnt like the idea of already having buttons on the screen getting in the way. i'll add options into the right click menus to output/print the code in the next version Alexander: ive never had that problem, can you tell me the exact steps to replicate it? GUIEditor_output.txt is shipped in the package so unless you delete it yourself it should always exist, i'll add that code for the next update though
×
×
  • Create New...