Jump to content

MIKI785

Members
  • Posts

    1,131
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by MIKI785

  1. Use <download_priority_group> in the meta.xml to make the 'gui' resource start first.
  2. Are you sure that the map is indeed running? I don't know what are the coordinates for this map.. one way of making sure to not fall is to spawn yourself in a helicopter. Something like this: addEventHandler("onPlayerJoin", root, function () local v = createVehicle(425, 0, 0, 100) spawnPlayer(source, 0, 0, 100) warpPedIntoVehicle(source, v) end) But this should really go into scripting and not here.
  3. I think that the resources CodyJ provides contain only the maps, nothing else. You have to do the actual gameplay yourself, including the spawn.
  4. MIKI785

    Camber

    Is that screenshot yours? Or are you asking how to do that? If the latter then use setVehicleComponentRotation. Each wheel is a separate component that you may set a rotation for. Edit: I think I misread it, I can't help you with this then. Ignore me .
  5. Try to install the WinXP instead then, you can get it here: http://mirror.s2.mtasa.ohbah.com/mtasa/main/mtasa_xp-1.5.5.exe Instructions are here: https://wiki.multitheftauto.com/wiki/Client_on_Linux_Manual But it mentions on the page that 1.5 has trouble running, so I don't know if it will actually work for you.
  6. I'm not an expert in this but I can see that the libcef.dll library is responsible for the crash, that's CEF (browser used ingame). Did you install the win7+ version? I think there is a 'legacy' winXP version that contains older version of CEF, maybe try installing that instead?
  7. MIKI785

    I can't play

    Are you saying that your FPS sticks to 50? I wouldn't call that laggy :D. But anyway, it's possible that your monitor has a 50hz or 100hz refresh rate and you've got V-sync enabled. Check your graphics settings and see if it is enabled, if so, disable it.
  8. You can't access the internal.db from within Lua. You may only access .db files located in resources or in the 'global' database directory as described on the dbConnect wiki page. The only way to connect to internal.db is to do it externally or make a module that will make it accessible. Another way could be to for example to use the FileSystem module and copy the internal.db to your resource's directory every once in a while. I'm not sure if you could access it directly using that module. Edit: It's possible that a symbolic link would do the trick, that would most likely be the best solution.
  9. MIKI785

    The last reply

    So, is this topic dead now?
  10. Well yeah.. it's quite simple really. Just create a separate table with the values of the nested tables and insert it.. there's not much to it. local poll = { ["nazev"] = "And", ["obsah"] = ' Yeah ipsum dolor sit amet, consectetur adipiscing elit. Integer rutrum quam mauris, sed \n commodo odio auctor malesuada. Sed lacus lacus, \n semper a nisi nec, condimentum tincidunt sem. \n Aliquam et odio nulla.', ["hlasoval"] = 0, ["Ano"] = 10, ["Ne"] = 15, } Ankety:insert(poll)
  11. No need for a module, just use db* functions listed here: https://wiki.multitheftauto.com/wiki/Template:SQL_functions. You can do whatever you want with those, supports both SQLite and MySQL.
  12. How is the explosionOnSpawn called? Is it through the event or command handler? Because if you're using the command then source is nil, hence getElementPosition returns false. To make it work in both cases you have to check if source ~= nil or if the first parameter ~= number (as onPlayerSpawn's first parameter is a number). Something like this should work: function explosionOnSpawn (player) if not source then --Source is nil, so we know that it was the command that executed it. source = player --make source be the 'player' end local pX, pY, pZ = getElementPosition(source) createExplosion ( pX, pY, pZ, 6, source ) end addEventHandler ( "onPlayerSpawn", getRootElement(), explosionOnSpawn ) addCommandHandler ( "explosion", explosionOnSpawn )
  13. I see now that it's not actually onClientRender that you're using, so that was never an issue. I don't see anything wrong with it, the issue is most likely in that 'interface' library.
  14. You didn't check for type, so you just made teamchat useless for people in Admin group.
  15. Do you want to forbid people from using the 'fire' control? Either by mouse button or ctrl? Because players could simply rebind that action to eg. ALT and they will be able to 'fire' again.
  16. Well of course, those functions are not meant to be used every frame. Just simply store the text in a variable and use that in the render handler instead. xmlRules = xmlNodeGetValue(xmlLoadFile("commands/rules.xml")) --store the text and not the node (btw. you should check if the file exists first) function testMyGui() help_window = interface:dxCreateWindow(x, y, width, height, tocolor(0, 0, 0, 125), false, "Help panel", (35/1080)*sy, tocolor(0, 0, 0, 225), tocolor(255, 255, 255, 255), nil) interface:dxAddBorder(help_window, "bottom", tocolor(255, 102, 255), 1) interface:setActiveGUI(help_window) interface:dxSetMovable(help_window, true) local tabPanel = interface:dxCreateTabPanel(0.025, 0.15, 0.95, 0.8, width*0.1521, true, help_window, tocolor(0, 0, 0, 125)) local tabRules = interface:dxCreateTab(tabPanel, "Rules", tocolor(0, 0, 0, 125), nil, tocolor(255, 255, 255, 255)) local RulesBox = interface:dxCreateTextWindow(0.025, 0.05, 0.95, 0.9, true, tabRules, tocolor(0, 0, 0, 100), tocolor(255,0,0,255), tocolor(0,255,0,255), false) interface:dxTextWindowAddText(RulesBox, xmlRules, tocolor(255, 255, 255, 255)) --show the text local tabOverview = interface:dxCreateTab(tabPanel, "Command usage", tocolor(0, 0, 0, 125), nil, tocolor(255, 255, 255, 255)) local tabCommands = interface:dxCreateTab(tabPanel, "All comannds", tocolor(0, 0, 0, 125), nil, tocolor(255, 255, 255, 255)) end addEventHandler("onClientResourceStart", getRootElement(), testMyGui)
  17. There are several options, triggerLatentClientEvent, triggerLatentServerEvent, fetchRemote, downloadFile. Then you can let the browser know that the download's finished via executeBrowserJavascript. Although, the browser should be able to handle this stuff without issues. Maybe it's just that your script is inefficient.
  18. Do you mean isDebugViewActive? https://wiki.multitheftauto.com/wiki/IsDebugViewActive Edit: I initially didn't see the screenshot, this isn't what you're looking for.
  19. Don't expect to get anything like that for free.
  20. You could use guiSetVisible instead, but I suppose you want it to remain active, correct? Btw. is that line the cursor? That is the blinking line when typing.
  21. I'm not really sure what's going on here. Post the code, that's the only way.
  22. Any script can call cancelEvent on any event. The number or order of script files within a resource makes no difference.
  23. He said that the country code gets displayed, this code is taken from the admin resource, meaning that it has to be running. Anyway, are there any errors/warnings? There has to be something wrong.
  24. See this: https://wiki.multitheftauto.com/wiki/GetElementMatrix
  25. You want to remove the player from the team if the state is false? Wiki says that in order to remove a player from a team, the team should be nil, so that could be done like this: setPlayerTeam(thePlayer, (state and asd or nil)) --Great variable name btw... I have no idea what that means. That's really simple, there is a function called toggleControl that toggles a control . So all that has to be done is this: toggleControl(thePlayer, "fire", not state) --Will toggle the control opposite to state, ie. state is true (godmode on) then control is false (disabled)
×
×
  • Create New...