Tails

Members
  • Content count

    655
  • Joined

  • Last visited

  • Days Won

    1

Tails last won the day on January 2 2017

Tails had the most liked content!

Community Reputation

75 Popular

3 Followers

About Tails

  • Rank
    Crime Partner

Details

  • Gang
    G&T Mapping
  1. [HELP] Anti Deathmatch Small Error

    (exports.SACGpolice:getWantedLevel(Player) == 0) that's a syntax error there, you probably want to return the statement return (exports.SACGpolice:getWantedLevel(Player) == 0)
  2. Taking letters from a string

    it does return just 3, print just outputs both arguments it returns. local text = "test3test3" local num, count = text:gsub('test', '') print(num) --> 33 print(count) --> 2
  3. The client event is triggered for all clients you'd have to add a check as well then. Put the code on the client side as well as the marker and use the onClientMarkerHit event. The event's callback returns 2 arguments, the element that hit the marker and the matching dimension. Ignore the latter for now. Example: local mark = createMarker(0, 0, 4, "arrow", 1) function onHit(element) if (element == localPlayer) then -- check if the element is the localPlayer (you) outputChatBox("hit") end end addEventHandler("onClientMarkerHit", mark, onHit) Hope this helps
  4. help hydra smoke script

    You could attach a smoke effect https://wiki.multitheftauto.com/wiki/CreateEffect Why not learn and do it yourself? This forum isn't for script requests, it's for help. We can only help you if you get stuck with your code.
  5. Someone Who Script Please Help Me!

    Here's how to display a YouTube video on the screen for everybody. I hope this will help you. local url = "https://www.youtube.com/tv#/watch/video/control?v=iZAqaykiS70&resume" local sw, sh = guiGetScreenSize() local browser = Browser(sw, sh, false, false) addEventHandler("onClientBrowserCreated", browser, function() browser:loadURL(url) end) addEventHandler("onClientRender", root, function() dxDrawImage(0, 0, sw, sh, browser) end)
  6. You are right. Go to this link https://wiki.multitheftauto.com/wiki/ToggleControl and check out the examples.
  7. A little problem here

    Pattern matching could be a solution here local slot1 = getElementData(localPlayer, "slot1") if slot1:match("key:%w") then
  8. Item system

    If you don't know, you should get rid of the element data and try experimenting with just tables. Look up some tutorials on tables and get used to them then afterwards you can use element data to sync data from a table. Here are a few links: https://devilsquid.com/lua-tables/ http://www.troubleshooters.com/codecorn/lua/luatables.htm https://www.tutorialspoint.com/lua/lua_tables.htm http://lua-users.org/wiki/TablesTutorial https://en.wikibooks.org/wiki/Lua_Programming/Tables
  9. A little problem here

    Not quite sure if I understand but it looks like you're trying to check if "slot1" contains any key and then proceed with some code. There are different ways you can probably approach this. First is a table, which would be smarter because it is faster than element data and element data is not very safe. If this is the server side I think you should be fine but still personally I'd go with an actual table. What you can do is just simply check if any element data exists on "slot1" by just doing if getElementData (localPlayer, "slot1") then --draw key image in inventory else --slot 1 is blank end if you set the "slot1" data to nil or false setElementData("slot1", nil) then it will return false and execute the second part of your code. If this is not what you meant, please try to explain your issue a bit more.
  10. Divide the size by the distance. For example: local d = getDistanceBetweenPoints3D(x, y, z, Mx, My, Mz); dxDrawRectangle(x, y, 500/d, 250/d); dxDrawText("Pay'n'Spray", x, y, x, y, tocolor(255,0,0), 55/d);
  11. Teleport in car after spawn

    Because the vehicle doesn't exist on the client, at least not the variable. Place the 2 functions on the server side in your function under createVehicle.
  12. Whats wrong with it

    You probably forgot to spawn the player or fade the camera back in. Use fadeCamera to remove the black screen.
  13. how to find closest world element?

    You can't really get any information from world models as they're not elements. However you can use process line, I think that's how the editor does it. Check: https://wiki.multitheftauto.com/wiki/ProcessLineOfSight and look at the examples. Process line returns information about what it hits, including ids.
  14. Easiest way to test my scripts?

    You'll only need the player https://www.vmware.com/products/workstation-player/workstation-player-evaluation.html ~90 MB
  15. Even simpler: local sw, sh = 1920, 1080; local cw, ch = guiGetScreenSize(); function rect(...) return dxDrawRectangle(arg[1]/sw*cw, arg[2]/sh*ch, arg[3]/sw*cw, arg[4]/sh*ch, arg[5], arg[6], arg[7]); end EDIT: By the way, there are many threads about the same issue with different solutions. Try the search button.