Jump to content

Patrick

Moderators
  • Posts

    1,143
  • Joined

  • Last visited

  • Days Won

    42

Everything posted by Patrick

  1. Is it works fine if you don't modify weapon property?
  2. Ez ennél sokkal-sokkal bonyolultabb, teljesen rossz úton jársz, kevered a client és server oldali függvényeket is. Ajánlom, hogy ezt hanyagold egy kicsit, tanulj/próbálj csinálni hasonló egyszerű dolgokat és utána térj vissza rá. - https://wiki.multitheftauto.com/wiki/Main_Page - https://wiki.multitheftauto.com/wiki/Scripting_Introduction - https://www.lua.org/manual/5.1/ - https://wiki.multitheftauto.com/wiki/Category:Tutorials - https://forum.multitheftauto.com/topic/34453-manuals - https://forum.multitheftauto.com/topic/64228-the-ultimate-lua-tutorial/ - https://forum.multitheftauto.com/topic/121619-lua-for-absolute-beginners - https://forum.multitheftauto.com/topic/95654-tut-debugging/ - https://forum.multitheftauto.com/topic/114541-tut-events/ - https://forum.multitheftauto.com/topic/117472-tut-scaling-dx/
  3. I never tested it, but I don't think it would make any big difference. But unnecesarry to convert it, except if you want to do something with elements, etc...
  4. Wrong language, moved to Portuguese section.
  5. Looks good to me, I think the problem is somewhere else. Is this code-part inside any event/function?
  6. Should look like this: [ [ { "region": "Albania" }, { "region": "Austria" } ] ] - Put an extra [ ] around your json.
  7. Is "Login" event triggered on client side? And make sure login() function called in JS. You can use console.log("") to print out something to /debugscript 3 (Just enable development mode first: setDevelopmentMode with 'enableWeb')
  8. You can enable/disable it with /sPedWall command.
  9. https://wiki.multitheftauto.com/wiki/CEF_Tutorial#Javascript_to_Lua
  10. pAttach v1.1.3 Moved to GitHub: https://github.com/Patrick2562/mtasa-pAttach Download: https://github.com/Patrick2562/mtasa-pAttach/releases/tag/v1.1.3 - Added interior change event. - Added update checker.
  11. Other? I don't know. You can search on Forum.
  12. Hi, probably not. Check this topic: https://forum.multitheftauto.com/topic/123697-help-cursor-tracking
  13. You pass 7 args to dbExec, but you have only 6 questionmarks in query string. And you have to use ` instead of ' around table/column names. INSERT INTO `logging` SET name=?, account= ?, type= ?, type2= ?, tick= ?, action= ?, serial= ?
  14. Patrick

    Auto Spam

    local creation = 10 local x_change = 5 local y_change = 6 local object_id = 955 local start_x, start_y, start_z = 0, 0, 3 local objects = {} for i = 1, creation do objects[i] = createObject(object_id, start_x + i*x_change, start_y + i*y_change, start_z) end function getPositionOf(index) return (index and objects[index]) and getElementPosition(objects[index]) or false end local x, y, z = getPositionOf(2) iprint(x, y, z) Here are some excellent resources to learn the basics of Lua scripting: - https://wiki.multitheftauto.com/wiki/Main_Page - https://wiki.multitheftauto.com/wiki/Scripting_Introduction - https://www.lua.org/manual/5.1/ - https://wiki.multitheftauto.com/wiki/Category:Tutorials - https://forum.multitheftauto.com/topic/34453-manuals - https://forum.multitheftauto.com/topic/64228-the-ultimate-lua-tutorial/ - https://forum.multitheftauto.com/topic/121619-lua-for-absolute-beginners - https://forum.multitheftauto.com/topic/95654-tut-debugging/ - https://forum.multitheftauto.com/topic/114541-tut-events/ - https://forum.multitheftauto.com/topic/117472-tut-scaling-dx/ Videos: https://www.youtube.com/watch?v=Goqj5knKLQM&list=PLY2OlbN3OoCgTGO7kzQfIKPj4tJbYOgSR
  15. Egy kép az nem túl sok, leginkább semmi. ? De, a dxDrawMaterialLine3D függvénnyel tudsz képet renderelni a térben. Ehhez nyilván tudod a játékos koordinátáit. Lényegében ennyire van szükséged, innventől kezdve számtalan módon megvalósíthatod, hogy a kép/képek egy időre láthatóak legyenek. Egy nagy, vagy több kis kép egy más fölött. Useful function, ami talán segíthet egy kicsit: dxDrawImage3D
  16. Wrong language, moved to Portuguese section.
  17. Patrick

    Auto Spam

    I don't understand.
  18. Patrick

    Auto Spam

    Something like: local creation = 10 local x_change = 5 local y_change = 6 local object_id = 955 local start_x, start_y, start_z = 0, 0, 3 for i = 1, creation do createObject(object_id, start_x + i*x_change, start_y + i*y_change, start_z) end
  19. Hi, you can use this resource to find texture names: https://wiki.multitheftauto.com/wiki/Shader_examples#Texture_names
  20. function knockBack(distance) local x, y, z = getElementPosition(localPlayer) local _, _, r = getElementRotation(localPlayer) local angle = math.rad(r - 90) distance = distance or 1 x = x + math.cos(angle) * distance y = y + math.sin(angle) * distance setElementPosition(localPlayer, x, y, z) end knockBack(0.5)
  21. Wrong language, moved to Portuguese scripting.
×
×
  • Create New...