Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Zango last won the day on November 6 2020

Zango had the most liked content!

Community Reputation

31 Good


About Zango

  • Rank
    Forum Helper
  • Birthday 19/09/1993


  • Location

Recent Profile Visitors

1,935 profile views
  1. It's because you are trying to turn table 'v' into a string. As you can find on the wiki for dbPoll, in your case 'p' will be like this { { colname1=value1, colname2=value2, ... }, { colname1=value3, colname2=value4, ... }, ... } So you need to refer to the column name first outputChatBox(k.." = "..v.id); For your purpose, I suggest using inspect instead which converts a table to a readable string. function listTable(queryHandle) local db = dbConnect("sqlite","blips.db") local p = dbPoll(dbQuery(db, "SELECT id,icon,name FROM tabelaBlips"), -1); i
  2. This extension has code completion for VS code. It's the only one I know of.
  3. You need to parse radians to it, like this isMouseInCircleSector(sx/2, sy/2, 330, math.rad(0), math.rad(90))
  4. If you only want to see if the point is inside one of the circle's quadrants, it can be done really simple. If you want to check for any sector, I have made the following, where you define the sector from two angles. It would also be possible to define the sectors from vectors instead. local sx, sy = guiGetScreenSize( ) function isMouseInCircleSector(cx, cy, r, angleStart, angleEnd) local mx, my = getCursorPosition() if not mx then return end -- Relativise mouse position to circle center mx = mx * sx - cx my = my * sy - cy -- Convert angles to vectors local x1, y1 = r * mat
  5. addEventHandler("onClientMarkerHit", root, MKH_OPEN) If you bind this event handler to the local player instead addEventHandler("onClientMarkerHit", localPlayer, MKH_OPEN) The GUI should only open when you hit the marker.
  6. setCameraTarget() To focus camera on player again
  7. The map editor can now remove collisionless world objects, if you toggle "Enable collision patches" in the options. This will also make these models selectable when placed as objects. https://mirror.mtasa.com/mtasa/resources/
  8. Zango


    Try downloading the latest version, from mtasa.com, and run MTADiag again
  9. Zango

    aiming problem

    What version of MTA are you on? type "ver" in console (F8) Does this happen on one server or several? Can you upload a video of this?
  10. Zango

    [Help] Turf

    Have a look at the radar area functions and colshape functions. What are you looking to do?
  11. The only way right now is it to interrupt the entering task, like you do when you hold movement keys as a player during jacking. If you set the "backwards" control state after jacking starts, you can do this. The current implementation of jacking is very lacking in this aspect. If jacking is aborted for one of many reasons, the server doesn't know how far the jacker is, ie. if he physically pulled out the jacked ped yet, so it relies on the jacker to abort properly. But for peds, if the syncer changes the jacking isn't aborted properly and the jacker will be warped into the car. This is s
  12. It will give you better results, as in the random numbers wont be the same each time you run the script. But it wont make the Lua random generator better, it has a propensity for certain numbers and patterns like any pseudo-random number generator. If you need better randomness you can consider fetching numbers from random.org, they have an API.
  13. local last_button_action = 0 function onClientKey(button, pressOrRelease) if not pressOrRelease then return end local boundKeys = getBoundKeys("vehicle_secondary_fire") if not boundKeys then return end if not boundKeys[button] then return end local tick = getTickCount() if tick - last_button_action < 500 then cancelEvent() return end last_button_action = tick end addEventHandler("onClientKey", root, onClientKey) This will limit the vehicle_secondary_fire control to once every 500 ms, it should be enough to block the super jump on bike. This applies to all vehicles,
  14. If you want to get the target in the center of the screen, you can use getCameraMatrix. It returns the camera position and lookat position, which is a unit vector from the camera position, so you can easily multiply it to get a point further out. Made the following so you can see if thats what you need. local scrW, scrH = guiGetScreenSize() local maxTargetDistance = 100 addEventHandler("onClientPreRender", root, function() local cx, cy, cz, lx, ly, lz = getCameraMatrix() local px = cx + (lx - cx) * maxTargetDistance local py = cy + (ly - cy) * maxTargetDistance local pz = cz
  15. To see errors and warnings from your script, use /debugscript 3. The problem here is you are parsing a resource element into triggerClientEvent where it expects a player. function ShowImage (player) The player here is a resource, because you have bound it to onResourceStart. If you want to send this image to everyone on the server, use root as "sendTo" parameter. triggerClientEvent ( root, "onClientGotImage", root, response ) I've made a few changes to it, see the comments here: -- server function ShowImage() outputChatBox ( "event called, fetching image..."
  • Create New...