Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 29/03/17 in all areas

  1. outputChatBox ("Teleportáltál: "..getPlayerName(jatekos)..".", admin, 255, 0, 0, true) outputChatBox ("Teleportált hozzád: "..getPlayerName(admin)..".", jatekos, 255, 0, 0, true)
    2 points
  2. هو استفاد وش مشكلتك الحين ؟!
    2 points
  3. حرام ضض @#BrosS وش الحرام بالموضوع ؟ بروس ماستر له شعبيته من زمان هنا وفيه اشخاص كثيرين يعرفونه
    2 points
  4. استخدم صوره احسن واسهل addEventHandler "onClientRender" getElementPosition getScreenFromWorldPosition getDistanceBetweenPoints3D dxCreateTexture dxDrawMaterialLine3D مع شوية عمليات حسابيه عشان تخلي الصوره تتجه للمكان اللي فيه اللاعب الثاني.
    2 points
  5. This is a script that allows NPCs to find their own roads and paths without any predefined locations, all that is required is proper material mapped road Cols, and you're set. Currently, it's in really early stages, thus it's prone to wrecks, but even since this video I've vastly improved it. Video of it in action (Excuse the low quality, I have a crappy computer) By using multiple rays it's able to guide itself around tracks at a reasonable speed unlike previous attempts by other people this one is based off material type meaning as long as grass, rock, or something else other than a road surrounds the track it can find its way without walls. In the future, it could allow dynamic NPC races with little to no setup.
    1 point
  6. Back in the past there was a website that could convert maps created with the official in game map editor to a corresponding Lua script. Unfortunately tho that website appears to be down by now, so I've created my own converter using some regular expressions to find properties in a map file and generate a corresponding Lua script. Here's how it looks: So why would you convert your maps to Lua then? well there are many reasons, for instance: Reduce file size, converted Lua files is around 20% the size of it's corresponding map file. Ability to use the local cache, obviously a good thing since players won't have to download your maps every time they connect. Easy to customize, only one line needs to be changed to make all objects double sided, breakable etc.. (optional) Attach a discrete blip to each map object so that players can see where custom mappings exist. Since it uses regular expressions it will try to convert any input, no matter if the syntax is right or wrong. All properties from your map files are supported including, position (x,y,z), rotation (x,y,z), interior, dimension, breakable objects, double sided objects, blips and removal of world objects. The site is encrypted with SSL/TLS and nothing is logged or saved to prevent anyone from stealing your valuable maps. Here's the link to the site: https://lua.wuss.pw/
    1 point
  7. Not near my best works, there's still so much work I'd have to do to it for it to come close. Also, no I didn't base it off of that, to best honest I was watching @Sam@ke's older bot video and thought I'd have a go at my own
    1 point
  8. Which line are you getting the error for?
    1 point
  9. addEventHandler("onPlayerJoin", root,function() spawn(source) end) function spawn(source) x, y, z = 2028.4606933594, 1342.2176513672, 10.8203125 repeat until spawnPlayer(source,x+1,y+1,z, 0,303) setCameraTarget(source, player) fadeCamera(source, true) setElementRotation(source, 0, 0, -90) end
    1 point
  10. Add this line to it. setCameraTarget(source)
    1 point
  11. function spawn_player_on_join() spawnPlayer (source, 0, 0, 0) fadeCamera(source, true) end addEventHandler ("onPlayerJoin", spawn_player_on_join)
    1 point
  12. It's about indexing the table. You just set the table's value at the index of "192.168.56.1" to true. You can call that value by just indexing the table (tableName[indexName]). As you have true at that index, it will be like "if true then", so it goes into the true part, and outputs the "correct text". But, if you can't index the table, so it doesn't have somone elses IP registered in the table, it'll always return false, so it'll be like "if false then", so it goes into the false part. I hope you can understand it. It was just indexing a table with the corrected code, but at the original code you were comparing a table with a string value, and two different type of variables can't be equal.
    1 point
  13. function adminauth() local ips = { ["192.168.56.1"] = true } local p_IP = tostring(getPlayerIP(source)) if ips[p_IP] then setElementData (source, "administrator", true) outputChatBox ("correct! #FFFFFF"..p_IP.."", getRootElement(), 0, 255, 0, true) else outputChatBox ("wrong! #FFFFFF"..p_IP.."", getRootElement(), 255, 0, 0, true) end end addEventHandler ("onPlayerJoin", getRootElement(), adminauth)
    1 point
  14. function nodamage(attacker) if isElement(attacker) and getElementType(attacker) == "player" and attacker ~= localPlayer then cancelEvent() end end
    1 point
  15. @#_iMr.[E]coo ما فهمت طلبه في البداية والاخ راسلني بالخاص وفهمت مشكلته وكملت معه
    1 point
  16. X X X X وده يغير شكلهن , يحط صورة بدالهن
    1 point
  17. function nodamage(attacker) if isElement(attacker) and getElementType(attacker) == "player" then cancelEvent() end end
    1 point
  18. ^ اذا تعلمت عالـ PHP تقدر تسوي مود ومن خلاله يقدر المستخدم يرسل معلومات وتدخلها قاعدة بيانات ثم تستقبلها باستخدام الـ php وتشوفها انت من الموقع : )
    1 point
  19. 1 point
  20. setBlipIcon -- ex myBlip = createBlip setBlipIcon ( myBlip, ID )
    1 point
  21. Just to let you know when you submit your map you will have to submit the resource with it, markers that create and fix vehicles wont save on a .map file.
    1 point
  22. اعذروني جميعا ما انتبهت لطلبه انا حسبته بتايتل يعني صوره مع عنوان ذذ اعتذر للجميع
    1 point
  23. Did you try using a local file? Maybe the link is broken.
    1 point
  24. @F_F كودك كله غلط
    1 point
  25. I am not sure if you are asking a simple question or a hard question. It might be handy to add a screenshot. If it is a simple question, than this is one of the answers to it: -- 90 (1/4), 180 (1/2), 270 (3/4), 360 round and round and round... local rotationAdjustments = {xr = 90, yr = -90, zr = 0} function getWallRotation (element) local xr,yr,zr = getElementRotation (element) return rotationAdjustments.xr + xr, rotationAdjustments.yr + yr, rotationAdjustments.zr + zr end Simple add or subtract(minus value) rotations values of the mta rotation. Example: local awesomeRotationX, awesomeRotationY, awesomeRotationZ = getWallRotation(element) As @Jusonex said with processlineOfSign, which will return the exact rotation if used correctly. But you can also play a little bit with it manually. It doesn't have to be pixel perfect!!
    1 point
  26. Yea indeed, that is how it suppose to be haha . Except when it is a value that is variable, that would be annoying to edit later on.
    1 point
  27. 1 point
  28. Why don't you use both sides? Request clientside > trigger > serveride download > trigger > clientside write file. Else you can better use the downloadFile function. downloadFile
    1 point
  29. outputDebugString("Debug info start: " .. getTickCount()) for i, v in ipairs(resultdata) do inspect ( i ) inspect ( v ) -- https://wiki.multitheftauto.com/wiki/Inspect end ? outputDebugString("Debug info start: " .. getTickCount()) for i, v in ipairs(resultdata) do outputDebugString("type(resultdata) = " .. type(resultdata)) if type(v) == "table" then for j, data in pairs(v) do -- pairs << very important inspect ( j ) inspect ( data ) -- https://wiki.multitheftauto.com/wiki/Inspect end else outputDebugString("V ~= table, but: " .. type(v)) end end I actually forgot how to do it too, haha. Well I do remember that there has to be also a pairs loop in it, because it uses columns as keys.
    1 point
  30. How does the JSON looks like? How do you split up the JSON? (Note: if you use string keys in JSON, all numeric keys also become strings, which is very annoying) How does the data looks like in the mysql database? Tip: else outputDebugString("Unable to connect to the MySQL server") cancelEvent() -- don't start a resource that doesn't have connection to a mySQL server! Else you get an enormous flow of errors/warnings if the connection fails. end Normally an unique id is the first in the column and the rest of the data comes after that.
    1 point
×
×
  • Create New...