MIKI785

Members
  • Content Count

    1,104
  • Joined

  • Last visited

Community Reputation

56 Popular

4 Followers

About MIKI785

  • Rank
    Banger
  • Birthday 21/04/1997

Details

  • Location
    Dublin, Ireland

Recent Profile Visitors

2,218 profile views
  1. MIKI785

    Scripting in C++

    What you can do is to make a module, see here: https://wiki.multitheftauto.com/wiki/Modules. But that's only server side.
  2. MIKI785

    Hydra Flares

    If you want to control whether the rockets actually seek the target or not you have to implement this yourself using createProjectile.
  3. MIKI785

    Remove an Event Handler

    You can't remove that. It's an anonymous function, so you don't have the pointer to it (its name). You can't reference anonymous functions, therefore you can't reference it in removeEventHandler.
  4. MIKI785

    Can't run map editor

    Try starting the server manually from MTA/server/MTA server.exe.
  5. MIKI785

    please help me please :'(

    engine functions are 'global'. You cannot replace a model for a single element. You may only replace the texture using shaders.
  6. MIKI785

    [HELP] Element data

    Yes? I've told you what's wrong. Also, I can't see getElementData with the same data name anywhere.
  7. MIKI785

    [HELP] Element data

    You're not setting any value.
  8. MIKI785

    error in local

    The wiki says that it may return nil if there aren't any more rows to return. Are you sure that the result set isn't empty?
  9. MIKI785

    Database Error

    You're saying that youre not able to rename a file and you get an error saying 'Access denied', isnt that an ACL issue? Does the resource have access to it?
  10. MIKI785

    marker

    Make the marker pure black rgb(0, 0, 0). That will make it invisible.
  11. MIKI785

    Database Error

    You have to give the resource calling fileRename access to ModifyOtherObjects or something like that, look for it in your ACL.xml and you'll find it.
  12. MIKI785

    Is it possible?

    In short, yes. But it depends on the approach. If you're using GUI Memo then no, that won't work. If you're using dx then yes, you can make that work (but that would be unnecessarily difficult). I personally think that the best approach here would be to use CEF. It would be very easy to make that happen since there are o lot of open source script editors written in JavaScript for the web, just google it and I'm sure you'll find loads.
  13. MIKI785

    Save and load data with JSON

    I just noticed that he uses an element to index the table, that can't be saved into a file. You'd have to use a different way of knowing which vehicle you're talking about. setElementID and getElementByID could be the answer,
  14. MIKI785

    Save and load data with JSON

    I don't see you saving it anywhere though. addEventHandler("onClientResourceStop", getResourceRootElement(getThisResource()), function() for k, vehicle in pairs(getElementsByType("vehicle")) do if indicatorInfo[vehicle] then local data = toJSON({indicatorInfo[vehicle]["side"] or nil}) end end end ) You store the data in a local data and that's it. So the data is then lost, it never gets saved anywhere. addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() bindKey(blinkerLeft, "down", toggleIndicator) bindKey(blinkerRight, "down", toggleIndicator) bindKey(blinkerBoth, "down", toggleIndicator) for k, vehicle in pairs(getElementsByType("vehicle")) do indicatorInfo[vehicle] = indicatorInfo[vehicle] or {} indicatorInfo[vehicle]["side"] = fromJSON(data) end end ) Here the data is undefined/nil. You never give it a value. You should save the data somewhere, database would be the best but if that's too complex then try simply saving it into a file and then read that file when the resource starts.
  15. MIKI785

    Respawn vehicle by weapon fire

    No. This section is not intended for code requests. You're supposed to post a snippet, tell us what's wrong, any debug info and we will try to help you. I'm saying that you are triggering a server side event 'gundv:respawnVehicle' but that event is never handled on the server side (at least not in the snippet you provided).