-
Posts
1,140 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Patrick
-
Não consigo tirar as pessoas do mini mapa.
Patrick replied to davikroth's topic in Programação em Lua
Wrong language, moved to Portuguese section. -
Moved to Resources section.
-
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...
-
Wrong language, moved to Portuguese section.
-
Good job
-
Looks good to me, I think the problem is somewhere else. Is this code-part inside any event/function?
-
Should look like this: [ [ { "region": "Albania" }, { "region": "Austria" } ] ] - Put an extra [ ] around your json.
-
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')
-
You can enable/disable it with /sPedWall command.
-
https://wiki.multitheftauto.com/wiki/CEF_Tutorial#Javascript_to_Lua
-
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.
-
Other? I don't know. You can search on Forum.
-
Hi, probably not. Check this topic: https://forum.multitheftauto.com/topic/123697-help-cursor-tracking
-
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= ?
-
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
-
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
-
Wrong language, moved to Portuguese section.
-
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
-
Hi, you can use this resource to find texture names: https://wiki.multitheftauto.com/wiki/Shader_examples#Texture_names
-
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)
-
Wrong language, moved to Portuguese scripting.
-
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
-
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.