-
Posts
1,131 -
Joined
-
Last visited
-
Days Won
2
Everything posted by MIKI785
-
Use <download_priority_group> in the meta.xml to make the 'gui' resource start first.
-
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.
- 154 replies
-
- lc
- carmageddon
-
(and 1 more)
Tagged with:
-
I think that the resources CodyJ provides contain only the maps, nothing else. You have to do the actual gameplay yourself, including the spawn.
- 154 replies
-
- 1
-
- lc
- carmageddon
-
(and 1 more)
Tagged with:
-
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 .
-
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.
-
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?
-
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.
-
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.
-
So, is this topic dead now?
-
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)
- 1 reply
-
- 1
-
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.
-
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 )
-
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.
-
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.
- 6 replies
-
- 1
-
- disable puch
- disable ctrl
-
(and 1 more)
Tagged with:
-
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)
-
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.
-
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.
-
Don't expect to get anything like that for free.
-
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.
-
I'm not really sure what's going on here. Post the code, that's the only way.
-
Any script can call cancelEvent on any event. The number or order of script files within a resource makes no difference.
-
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.
-
See this: https://wiki.multitheftauto.com/wiki/GetElementMatrix
-
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)