Jump to content

MIKI785

Members
  • Posts

    1,131
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by MIKI785

  1. MIKI785

    HTTPS

    Browser (CEF) definitely can. fetchRemote can as well, but I think that the support was added recently, so make sure your server is up to date. And I have a question, why didn't you just try it? It would be faster for you than asking here.
  2. Deleting the object won't do it as there is a colshape that does the actual work. I would do something like this: addCommandHandler("rendorspike", function(player) if (player) then local x, y, z = getElementPosition(player) local spike = createObject(2892,x+2,y+2,z-0.6) local x2, y2, z2 = getElementPosition(spike) local blow = createColSphere(x2, y2, z2, 3) setElementData(blow, "blowObject", spike, false) end end) addEventHandler("onColShapeHit", root, function (player) --Do it for all colshapes if not getElementData(source, "blowObject") then return end --Not a 'blow' colshape; don't care.. if player and getElementType(player) == "player" then if isPedInVehicle(player) then local pveh = getPedOccupiedVehicle(player) setVehicleWheelStates(pveh,1,1,1,1) end end end) addCommandHandler("delspikes", function (player) for i, element in pairs(getElementsByType("colshape")) do if getElementData(element, "blowObject") then --is a 'blow' colshape destroyElement(getElementData(element, "blowObject")) --Object has to be destroyed first destroyElement(element) --Destroy the colshape itself end end end) Didn't try it but you should get the idea.
  3. MIKI785

    [HELP]SQL

    That path is invalid, see here: https://wiki.multitheftauto.com/wiki/Filepath
  4. That's not what he wants, this function returns a pair of world x and y positions, these represent the are that is visible on the F11 map. He wants the screen coordinates of the HUD radar. I don't actually know how to get that, I'm only pointing out that this function won't help you so that you don't get confused.
  5. What about debug? You should be getting errors as you're trying to call getAccountName/getPlayerAccount - both are nil on the clientside. I suggest you store the account name using element data, then you may access it from the clientside.
  6. MIKI785

    [Help] SQL

    I suppose you use dbQuery, so: _dbQuery = dbQuery --store the original func function dbQuery (connection, ...) local arg = {...} if not connection then connectionGlobal = dbConnect() --fill it in and change connectionGlobal to wherever you store the connection connection = connectionGlobal end _dbQuery(connection, unpack(arg)) end Note that this won't work if you use callbacks in dbQuery as it expects the first argument to be the connection. Also, didn't test this.
  7. MIKI785

    [Help] SQL

    Yes, or if you do a lot of queries, then make your own query function and stick the condition in there so you don't have to repeat the same thing everywhere.
  8. MIKI785

    [Help] SQL

    The connection could have timed out. If there is no query for some time period (usually around 20-30 minutes) then the (My)SQL server closes the connection.
  9. Did you even try it? That event should get triggered onClose, doesn't say how so it should work when clicking the X.
  10. MIKI785

    Tables

    Overwriting table like this is not a good idea, there may not be table functions in your code but there could be some in other parts of the script that is not shown here and since you are doing this as a global, it will affect other files within the resource as well.
  11. Not entirely true, MTA server only includes the login command. register is actually provided by the admin resource.
  12. Handling would be the first thing to try but if it doesn't help you could try boosting the speed using this: https://wiki.multitheftauto.com/wiki/SetElementSpeed. That may not be the best solution though.
  13. Does the GUI really flash like that or is it only the recording? Because if you've got errors in onClientRender it may cause lags.
  14. From what I've gathered it's just a vague message saying 'Can't open file'. Why? I don't know.. is the file really there? Is it declared in meta? Maybe it's a formatting issue, try a different file or a different format (like .ogg).
  15. I personally would use setElementData for this, simply save the resource settings as element data to 'resource' (predefined variable) and then you can use the same element on the client to access these data. No need to use events in this case. You may have to use resourceRoot, I'm not sure which one is correct in this case.
  16. There is a topic for this right in this section.. https://forum.multitheftauto.com/topic/11757-patching-your-101-or-200-version-of-gta_saexe/
  17. showchat is a client command, you can't disable it.
  18. MIKI785

    Help Me Please

    The process is described here: https://wiki.multitheftauto.com/wiki/Server_Manual.
  19. This isn't the correct place to ask this, this section is for Lua scripting, you're talking about MTA's code itself (c++). Try here instead: https://forum.multitheftauto.com/forum/107-open-source-contributors/
  20. MIKI785

    timer help

    You will never learn by simply copy-pasting. If you keep going on like that you will keep posting here every little issue you may have. It's really simple, player uses a command, you get the current tick using getTickCount, compare this with the tick that was saved in the user's account previously, if it's bigger, let the function execute and save the current tick + whatever the limit into the player's account.
  21. All this tells us is that a cancelEvent was called during onResourceStart.. why? I don't know.. can't see the code.
  22. MIKI785

    timer help

    Kind of difficult to understand what you want.. are you trying to limit a command use to once every 10mins? If so, using a timer is never a good way. Use getTickCount instead.
  23. MIKI785

    Crosshair

    I don't think there is a simple way of doing this.. you'd have to hide the default crosshair with setPlayerHudComponentVisible and then draw a custom one with dxDrawImage.
  24. MIKI785

    SavePlayerData

    In fact, there are at least two ways. One way is that the server crashes; nothing you can do there.. or that the resource gets stopped and a player leaves within the time the resource is not running; this can be solved using onResourceStop.
×
×
  • Create New...