Jump to content

Patrick

Moderators
  • Posts

    1,140
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Patrick

  1. 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...
  2. Wrong language, moved to Portuguese section.
  3. Looks good to me, I think the problem is somewhere else. Is this code-part inside any event/function?
  4. Should look like this: [ [ { "region": "Albania" }, { "region": "Austria" } ] ] - Put an extra [ ] around your json.
  5. 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')
  6. You can enable/disable it with /sPedWall command.
  7. https://wiki.multitheftauto.com/wiki/CEF_Tutorial#Javascript_to_Lua
  8. 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.
  9. Other? I don't know. You can search on Forum.
  10. Hi, probably not. Check this topic: https://forum.multitheftauto.com/topic/123697-help-cursor-tracking
  11. 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= ?
  12. 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
  13. 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
  14. Wrong language, moved to Portuguese section.
  15. Patrick

    Auto Spam

    I don't understand.
  16. 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
  17. Hi, you can use this resource to find texture names: https://wiki.multitheftauto.com/wiki/Shader_examples#Texture_names
  18. 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)
  19. Wrong language, moved to Portuguese scripting.
  20. if getElementData(source,"adminduty") >= 1 then outputChatBox("#32b3ef[ADMIN] " .. adminrang .. " " .. playerName .. " "..kieg.." mondja: " .. message, source, 255, 255, 255, true) exports['sas_freecamtv']:add(shownto, playerName .. " mondja: " .. message, source) else outputChatBox(playerName .. " "..kieg.." mondja: " .. message, source, 255, 255, 255, true) end
  21. Gondolom ahol megvannak adva az admin tag-ek. Ahol nem kell tag oda csak egy üres stringet hagysz (hogy ne írja, hogy "Player"), meg oda írod bele a színkódot is. Gondolom.
×
×
  • Create New...