Jump to content

xyz

Members
  • Posts

    78
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

xyz's Achievements

Transformer

Transformer (11/54)

0

Reputation

  1. xyz

    Peds' aim

    What? I don't want to trigger this on literally every colshape I leave. That colshape is the only colshape in that resource so I can use resourceRoot. I didn't ask for that. resourceRoot works well as it is. Also, I'm not leaving the colshape, just going behind a wall, how is leaving the colshape going to help in any way?
  2. xyz

    Peds' aim

    So I am making a robbery script with guards, but the guards only hit me when I restart the script near them. When I go behind a wall and come back their aim is off, and they don't hit me. It sometimes looks like the bullet goes into me but no damage. function cancelUnkillableDamage(p, md) if (isElement(p)) then if (p.type ~= "player") then return end addEventHandler("onClientRender", root, function() for _, v in ipairs(Element.getAllByType("ped")) do if (v:getData("ms:guard") == true) then local x, y, z = getPedBonePosition(p, 3) local px, py, pz = getElementPosition(v) local dg = findRotation(px, py, x, y) setPedAimTarget(v, x, y, z) setPedControlState(v, "fire", true) setElementRotation(v, 0, 0, tonumber(dg)) end end end) end end addEventHandler("onClientColShapeHit", resourceRoot, cancelUnkillableDamage)
  3. Doesn't look like you get playerPos from anywhere, can you post the function that triggers the checkPlayerPos event
  4. What makes the function get executed? Also the chances of being exactly at those coordinates are really slim.
  5. xyz

    ScrollBar

    onClientGUIScroll, guiScrollBarGetScrollPosition(scroll) / amount is what I use to limit the maximum
  6. Change root to localPlayer and remove root completely
  7. Use setElementRotation
  8. xyz

    Browser to ingame

    Second question is, how can I get ingame players to a browser site? inb4 no one knows
  9. Simply, does MTA have any connection thing that like starts it up and connects to a server if it's not started up or anything, if it does can I have an example? EDIT: From a webpage like from google chrome.
  10. Loop through all the players and use getDistanceBetweenPoints3D to check if they're near enough.
  11. So I made a script that creates a vehicle in the air, and the vehicle needs to drop instantly, but it doesnt as it's not rendered for anyone. Is there way to make it drop instantly?
  12. xyz

    SQL to gridlist

    Nobody can answer?
  13. xyz

    SQL to gridlist

    I do create a new table for every new user addEventHandler("onPlayerLogin", root, function() local acc = getPlayerAccount(source) local accn = getAccountName(acc) dbExec(con, "CREATE TABLE IF NOT EXISTS "..accn.." ('num', 'model', 'x', 'y', 'z', 'yRot', 'r', 'g', 'b', 'fuel', 'hp', 'plate', 'upgrades')") end)
  14. xyz

    SQL to gridlist

    Doesn't work, the problem here is that it doesn't get the stuff from the table, it just inserts nil and false into the gridlist.
×
×
  • Create New...