Jump to content

IIYAMA

Moderators
  • Posts

    6,097
  • Joined

  • Last visited

  • Days Won

    218

Everything posted by IIYAMA

  1. IIYAMA

    Money Hack

    yea, that is possible. https://wiki.multitheftauto.com/wiki/OnClientKey Useful for detecting command exploits: https://wiki.multitheftauto.com/wiki/GetBoundKeys https://wiki.multitheftauto.com/wiki/GetKeyBoundToCommand But in mind to respect privacy and how it will impact the user his network. preEvent postEvent preFunction postFunction Timing: pre = before it happens post = after if happens Type of capture: event = hooks in to the event system function = hooks on to the MTA function calls (afaik it only supports MTA functions, at least that is what I make up about the wiki) And you might also want to remove this hook when you figure out the issue, since it is bad for performance. Instead use exports to a single resource and log there.
  2. IIYAMA

    Money Hack

    Using the root prefixed variable in your code is a bit tricky. Better not using it. But never the less. Since it is serverside code, it looks like the resources you are using either has an exploitable bug (likely), backdoor (likely) or is missing some security. Don't you keep more money logs? function onPreFunction( sourceResource, functionName, isAllowedByACL, luaFilename, luaLineNumber, ... ) local args = { ... } local resname = sourceResource and getResourceName(sourceResource) outputDebugString( "preFunction" .. " " .. tostring(resname) .. " " .. tostring(functionName) .. " allowed:" .. tostring(isAllowedByACL) .. " file:" .. tostring(luaFilename) .. "(" .. tostring(luaLineNumber) .. ")" .. " numArgs:" .. tostring(#args) .. " args:" .. inspect(args) ) end addDebugHook( "preFunction", onPreFunction, {"setPlayerMoney", "givePlayerMoney"} ) https://wiki.multitheftauto.com/wiki/AddDebugHook (recommended to write the logs to a different file)
  3. IIYAMA

    Money Hack

    How did you verify that he actually passed that amount? Modifying screenshots or ingame textures is very easy to do. Make sure you verify it based on serverside data. You said you checked his bank account? What do you consider somebody his bank account? getPlayerMoney / getAccountData / other database ? getAccountData / other database are not restricted to 99,999,999. Also I am not sure if setPlayerMoney is restricted to 99,999,999, it is surely displayed as a negative value, but I am not sure how MTA handles that behinde the scenes (only way of knowing is to test or check the source code).
  4. Please read the section guidelines before posting. Section guidlines Topic locked
  5. Double post to work around a topic lock.
  6. Locked for purposely not being transparent about the source resource.
  7. You can use Object Preview to draw it in front of the player. https://community.multitheftauto.com/index.php?p=resources&s=details&id=11836
  8. If the object doesn't need collision, you can create it with a lowLOD appearance. https://wiki.multitheftauto.com/wiki/CreateObject Syntax createObject function: object createObject ( int modelId, float x, float y, float z, [ float rx, float ry, float rz, bool isLowLOD = false ] ) Set lowLOD to true. That will increase draw distance.
  9. IIYAMA

    [HELP]Molotov

    Oh you are confused. If you say first that you haven't tested something and also come to the conclusion that it is doesn't work. How do you come to that conclusion then? At that moment I am a 1000x more confused than you are.
  10. IIYAMA

    [HELP]Molotov

    You can look in to the future? ? I believe you for some unknown reason haha
  11. IIYAMA

    [HELP]Molotov

    For example (raw version without a lot of checks): function onClientExplosion(x, y, z, theType) local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle then local x,y,z = getElementPosition(vehicle) extinguishFire(x, y, z, 30) callNextFrame(extinguishFire, x, y, z, 30) end end addEventHandler("onClientExplosion", root, onClientExplosion) callNextFrame source code:
  12. IIYAMA

    [HELP]Molotov

    Use onClientExplosion: https://wiki.multitheftauto.com/wiki/OnClientExplosion And then clear the fires for 2 frames at minimal. For the 2e frame, use the callNextFrame function. (tableRemove variable) https://gitlab.com/IIYAMA12/mta-communication-enchantment/-/blob/master/sync/sync_shared.lua#L46 (The function scope) https://gitlab.com/IIYAMA12/mta-communication-enchantment/-/blob/master/sync/sync_shared.lua#L424
  13. I have never looked at the source code before, or rather I have no clue where to begin even. If you mean the mission cars that are driving in the distance? I don't think they are actually driving those with collision in mind. They are (most likely) just following a way path with a non-variable speed. When you are getting close, first the car(target) spawns in and after that the traffic around it will be carefully generated. At least that is how I would create something like that. I did that same concept with trains, and that worked surprisingly well.
  14. Note: Even if you could see an vehicle at 1200m away, it wouldn't have anything to stand on. You would see it just fall down the floor, over and over.
  15. Another approach would be checking if there is something between the camera and the text position.https://wiki.multitheftauto.com/wiki/IsLineOfSightClear But it does have some flaws, like for example being blocked by transparent collisions Or the camera center is blocked by collision, but the sides are not when peaking around a corner. (Can be fixed by using more lines or using this function https://wiki.multitheftauto.com/wiki/GetScreenFromWorldPosition)
  16. Nope, it does not. Maybe you used too much of the example code? local messageNodes = xmlNodeGetChildren(xml) local outputText = "" for i,node in ipairs(messageNodes) do outputText = outputText .. tostring(xmlNodeGetValue(node)) .. "\n" end outputChatBox(outputText)
  17. IIYAMA

    table with svg

    Remove the sub table. This is a table: {}. And in your code you have 2 of those. 1 main table and 1 sub table. In here is the sub table you have to remove: {svgCreate(400, 200, "assets/media/roundedRectangle.svg")} You only want the value of svgCreate in your main table.
  18. Locked for unclear ownership of (multiple) resource(s) which code is used on multiple topics. TR_mysql <or/and> nl_mysql
  19. Locked for unclear ownership of (multiple) resource(s) which code is used on multiple topics. TR_mysql <or/and> nl_mysql
  20. If it is that sketchy (the ownership that is), locking the topic wouldn't be a bad idea.
  21. Removed support info
  22. Creating a Roleplay/RPG server?

    Today I have added a utility function to the wiki, which you might want to use.

    https://wiki.multitheftauto.com/wiki/GetPedGender

    --[[
    
    The command /gender will display the gender of your player/ped element.
    
    ]]
    addCommandHandler("gender", 
    function () 
    	outputChatBox("My gender: " .. tostring(getPedGender(localPlayer)))
    end)

     

  23. IIYAMA

    Help Needed

    Whoops, it seems like I forgot to invert the second part. ?
  24. IIYAMA

    Help Needed

    You might want to add some debug lines to figure out the issue. function postAnn(msg, r1, b1, g1, playsound) iprint("postAnn arguments", msg, r1, b1, g1, playsound) if msg and (string.len(msg) > 0) then iprint("postAnn message is OK") if playsound and tonumber(playsound) and (tonumber(playsound) > 0) then iprint("postAnn play audio") playSound(playsound .. ".mp3") end alphaBG = 0 textString = msg stringLegth = string.len(textString) * 11 posX = sx if r1 and b1 and g1 then r, b, g = r1, b1, g1 end show = true addEventHandler("onClientRender", getRootElement(), drawAnnText) end end addEvent("rl:post", true) addEventHandler("rl:post", getRootElement(), postAnn) If none of the debug lines are displayed, the issue is probably on serverside (or less likely but possible somewhere else clientside). You will be looking for: triggerClientEvent( [optional,] "rl:post" You should search for: rl:post Keep in mind that doing it this way, the effect speed is based on FPS and not time. Which means that the effect speed is reduced depending on the user his FPS. So better to use 1 of the 2 methods above.
  25. Make sure that clientside and serverside are separate files Make sure that serverside is defined as a serverside file in the meta.xml Make sure that the serverside file does actually run. (Add outputChatbox/iprint/print/outputDebugString on the first line of the file and see if it is displaying something, the text output doesn't matter as long as you recognize it)
×
×
  • Create New...