Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 26/05/20 in all areas

  1. I'm excited to show you my latest tool. This time it is something different than my previous tools. It is a bigger project which came to my mind over 2 years ago. I failed at first time because I had trouble with rotations (built in mta function doesn't work well so I had to use quaternions which caused problems as well). Moreover one of devs was working on new editor and he was going to add multi selection option but he cancelled the project. After 2 years I decided to finally write it and also add few additional features. Many hours spent on the tool, thousands lines of code but here is it. I hope you like it and find it useful. Personally I think it should speed up your mapping a lot. Few features might look complicated (actually they are easy to use) so I advice watching or reading tutorial carefully. Features Let's see what this tool is capable of! Create groups of elements using various selection tools and element filters a. edit their position and rotation around all axes b. change their properties - all popular element types are supported c. clone / delete options d. large group support enables you to move / edit whole parts or even maps Duplicate 2 groups Change pivot position Add groups to library a. browser with search and sort options b. loading big groups enables you to join many maps into 1 c. import option which adds all MSTU groups from a given map Cover groups a. create your own cover variations or object compositions b. default cover settings makes covering even faster Customize tool settings on your own needs Download More info and full tutorial you will find here: https://www.thecrewgaming.com/forum/showthread.php?tid=2467&pid=12255#pid12255 Support me If you want to support me leave feedback and also you can buy me a coffee so I won't starving. Thanks a lot! Buy Coffee Feel free to ask questions below or via PM/discord. I'm also opened for script requests. I will keep updating the tool in case you find some bugs. Discord: https://discordapp.com/invite/C4TRxr8
    5 points
  2. Good morning / afternoon or evening respectively, today I am releasing a Panel made with DGS, the panel contains animations and others. If you find a bug or if you want a panel made to order, you can contact me at: Discord: ingen1us#6990 Or you can contact on the Discord of BroothsGames: https://discord.gg/P5wWSt Credits: BroothsGames Video: https://streamable.com/yq8cu4 Link: https://www.mediafire.com/file/sezjmpdt350o16c/DGS-Panel.rar/file
    1 point
  3. It was solved in #mapping on MTA discord, solution was to disable occlusions, should anyone else be affected by this.
    1 point
  4. saveMapData... ? thats new for me ?
    1 point
  5. An alternative is to save an specific part of the element tree. Pick the method that works best for you. local file = xmlCreateFile ("map.xml", "map") local baseElement = createElement("temporary") --[[ ]] local element = -- createObject, createVehicle, etc. etc, setElementParent(element, baseElement) --[[ ]] saveMapData ( file, baseElement ) xmlSaveFile ( file ) xmlUnloadFile ( file ) destroyElement(baseElement) -- destroy every element, parent as well as the children thanks to propagation Pro's Flexibility, you do not have to write specific code for other elements. Cons: Serverside only No custom properties with special characters, for example : notations and code comments on the fly. All properties are copied, you do not have fully control which ones are saved.
    1 point
  6. Probably general.http is enabled for Default ACL group, set it to false.
    1 point
  7. Loop trough all objects, get details and write it to a file, like any .map editor file. You can check the syntax in an existing .map file. Something like that -- CLIENT SIDE local objects = getElementsByType("object") local file = fileCreate("clonedmap.map") fileWrite(file, "<map>\n") for i = 1, #objects do local obj = objects[i] local x, y, z = getElementPosition(obj) local rx, ry, rz = getElementRotation(obj) row = ('\t<object id="something (%d)" breakable="%s" interior="%d" collisions="%s" alpha="%d" model="%d" doublesided="%s" scale="%d" posX="%f" posY="%f" posZ="%f" rotX="%f" rotY="%f" rotZ="%f"></object>\n'):format( i, tostring(isObjectBreakable(obj)), getElementInterior(obj), tostring(getElementCollisionsEnabled(obj)), getElementAlpha(obj), getElementModel(obj), tostring(isElementDoubleSided(obj)), getObjectScale(obj), x, y, z, rx, ry, rz ) fileWrite(file, row) end fileWrite(file, "</map>") fileClose(file) Save file to mta_folder/mods/deathmatch/resources/YOUR_RESOURCE_NAME/clonedmap.map
    1 point
  8. Looks very nice! ? Btw. you have currently tagged your topic as [SHOW], you might want to consider change it to [REL] since you actually released it.
    1 point
  9. getPlayerName já retorna o nick do joagdor, não precisa salvar em elementData. @Arantes faça com esta lógica: local NickBoxText = guiCreateEdit(...) local vNick = guiGetText(NickBoxText) if (haveOtherNick(vNick)) then outputChatBox ("Já tem alguém com esse nome online.") else setElementData ( localPlayer, "playername", vNick ) end
    1 point
  10. function haveOtherNick (myName) for i, player in ipairs (getElementsByType("player")) do if (getElementData (player, "playername") and getElementData (player, "playername") == myName) then return true end end return false end -- Exemplo: addCommandHandler ("teste", function (cmd) local nome = getElementData (localPlayer, "playername") if (nome) then if (haveOtherNick(nome)) then outputChatBox ("Já tem alguém com esse nome online.") end else -- Registro. end end Se quiser fazer com accountData, terá que fazer server-side.
    1 point
  11. You got banned because MTA detected your serial isn't authentic (it got generated after you successfully used a serial changing method). This method consists of multiple steps, and really isn't as simple as the things you mentioned that you did. We know that you did it deliberately, and the MTA detection for this act is accurate and has so far only resulted in bans for people that were trying to change their serial. So yeah, don't lie.. MTA is smarter than you think, and serials are more reliable than you think.. the current situation means that you succeeded half way but that MTA still stops you from doing it by making the 'new' serial unusable. Which in turn means, that you can only get unbanned if you undo the steps you've taken (which you damn well know) and this will restore your old serial, which hasn't been banned. Thanks for understanding!
    1 point
  12. aclGetGroup -- عشان تجيب القروب aclGroupListObjects -- عشان تجيب اي شيء ضايفه بالقروب سواءاً كان user. او resource. string.find -- عشان بس تجيب الحسابات الموجودة بكلمة user. getPlayerAccount -- تجيب حساب اللاعب getAccountName -- تجيب اسم حساب اللاعب aclGroupRemoveObject -- عشان تحذف الرتبه من حسابه ---- # طبعا وظيفة aclGroupListObjects ترجع لك جدول ف يعني انت تحقق ان القيم الي موجودة بالجدول تساوي 2 عشان تسحب منه الرتبه طبعًا لو مافهمت مالومك عشاني ماعرف اشرح .
    1 point
  13. مشاء الله تبارك الله سيرفر وناسة تايم مستمر ول عمره تعرض غدره ومستمر سبب واعي الادارة و الادمنية وزايدات حرصهم على مجتمع وناةس تايم الجميل بالتوفيق لكم انشاء لله الله يقويكم ?
    1 point
  14. pickuproupacj = createPickup ( -1637.6564941406,1411.2716064453,7.1875, 3, 1275, 1000 ) -- Cria o Pickup. function pegarroupa ( source ) local skin = getElementModel(source) -- Verifica skin de source if skin == 0 then -- Verifica se a skin de source é igual a 0, se for executa: addPedClothes ( source, "field", "field", 0 ) -- Adiciona uma camisa em source (modifique a seu gosto...) setElementData ( source, "zombie", true ) -- Seta o elemento (source) na data 'zombie' como true; setPlayerTeam ( source, teamzombie ) -- Seta o elemento source no team 'teamzombie' else -- Se a skin de source não for igual a 0, executara: outputChatBox("Pegue a skin do CJ primeiro!", source) -- Aviso para o mesmo pegar a skin 0 primeiro. end end addEventHandler ( "onPickupHit", pickuproupacj, pegarroupa )
    1 point
  15. setElementInterior e setElementDimension no pickup.
    1 point
  16. Server --***********************************-- --***********************************-- -- Anti AFK System -- -- By Al3grab -- -- Server Side -- --***********************************-- --***********************************-- ----------- CHANGEABLE AFK_TIME = 1 -- the time that if the player didn't moved he will be AFK , in minutes . AFK_TIMES = 5 -- afk times before the player get kicked . SHOW,AFK_MSG = true -- show the afk message [true or false msgs = true -- show messages on chat box ? ----------- function onResourceStart() -- outputDebugString("Anti-AFK By Al3grab | Started") -- startCheck() end addEventHandler("onResourceStart",resourceRoot,onResourceStart) function startCheck() checkTimer = setTimer ( function() for i,m in ipairs ( getElementsByType("player") ) do local idle = getPlayerIdleTime(m) if tonumber(idle) >= AFK_TIME * 60 * 1000 then if not isPlayerAfk(m) then -- the player is afk triggerEvent("onPlayerAfk",m,m,idle) end else local afk = isPlayerAfk(m) if ( afk == true ) then -- the player was afk and now he is back ! triggerEvent("onPlayerAfkBack",m,m) end end end end , 1000 , 0 ) end addEvent("onPlayerAfk",true) addEventHandler("onPlayerAfk",root,function ( Player , Time ) ------ if SHOW then if ( tostring ( AFK_MSG ) ) then showAfkMessage(Player,true) end end ------ setPlayerAfk(Player,true) ------ end ) addEvent("onPlayerAfkBack",true) addEventHandler("onPlayerAfkBack",root,function ( Player ) setPlayerAfk(source,false) ------ showAfkMessage(source,false) ------ end ) function isPlayerAfk(Player) local afk = getElementData(Player,"State-AFK") or false return afk end function setPlayerAfk(Player,state) setElementData(Player,"State-AFK",state or false) end function showAfkMessage(Player,state) if state == true then ev = "YouAreAFK" else ev = "YouAreNotAFK" end triggerClientEvent(Player,tostring(ev) or "YouAreAFK",Player) end function onAfkEnd(Player) Player = Player or source -- setElementData(Player,"AFKtime",getElementData(Player,"AFKtime") + 1 ) local afkTimes = getElementData(Player,"AFKtime") if ( afkTimes and afkTimes >= AFK_TIMES ) then kickPlayer(Player,"You Have Been Afk For : "..tonumber(AFK_TIME).." Minutes") if msgs then outputChatBox("** #FFFF00"..getPlayerName(Player).."#FFFF00 Has Been kicked for being afk ["..afkTimes.."]",root,255,0,0,true) end else killPed(Player) if msgs then outputChatBox("** #FFFF00"..getPlayerName(Player).."#FFFF00 Has Been slapped for being afk ["..afkTimes.."]",root,255,0,0,true) end end end addEvent("KillAFK",true) addEventHandler("KillAFK",root,onAfkEnd) client --***********************************-- --***********************************-- -- Anti AFK System For War -- -- By Al3grab -- -- Client Side -- --***********************************-- --***********************************-- -------------- CHANGEABLE NumToCount = 20 -- the number to count before the player get killed / kicked MSGtoShow = "You Are Afk" -- the Message to show CountSpeed = 1500 -- less number will be faster. -------------- UNCHANGEABLE rRoot = getResourceRootElement(getThisResource()) -- Resource Root ,, setElementData(getLocalPlayer(),"AFKtime",0) -- Rest AFK Times For Player setElementData(localPlayer,"State-AFK",false) --- DX --- sw, sh = guiGetScreenSize() -- Get The Screen Size x,y = sw/2,sh/2 -- Using Math to Set The Text in center addEvent("YouAreAFK",true) -- AFK Message Event addEventHandler("YouAreAFK",root, -- AFK Message Event Handler function() -- AFK Message Function function You() -- AFK Message Function dxDrawText( MSGtoShow, x-700,y-497,sw,sh,tocolor ( 0, 0, 0, 255 ), 4, "pricedown","center", "center", false, false, false)-- AFK Message Shaddow dxDrawText( MSGtoShow, x-700,y-500,sw,sh,tocolor ( 255, 255, 0, 255 ), 4, "pricedown","center", "center", false, false, false)-- AFK Message end -- END of AFK Message Function addEventHandler ( "onClientRender",root,You) -- AFK Message Event Handler Count() -- Kill Player Counting Trigger end ) function Count()-- Counting -- Count -- local n = NumToCount -- Count Number local count = ""..n.."" -- Count Number local x,y = sw/2,sh/2 -- Center Text function txt() dxDrawText(" You Will Be Killed After "..count.." Seconds", x-700,y-292,sw,sh,tocolor ( 0, 0, 0, 255 ), 1, "pricedown","center", "center", false, false, false) -- Counting DX dxDrawText(" You Will Be Killed After "..count.." Seconds", x-700,y-295,sw,sh,tocolor ( 255, 0, 0, 255 ), 1, "pricedown","center", "center", false, false, false)-- Counting DX dxDrawText(" Move To Cancel", x-700,y-241,sw,sh,tocolor ( 0, 0, 0, 255 ), 1, "pricedown","center", "center", false, false, false)-- Text DX dxDrawText(" Move To Cancel", x-700,y-243,sw,sh,tocolor ( 255, 0, 0, 255 ), 1, "pricedown","center", "center", false, false, false)-- Text DX end addEventHandler ( "onClientRender" , root ,txt)-- Adding DX Event Handler timer = setTimer ( -- Count function()-- Count n = n - 1 -- Count count = ""..n.."" -- Count playSoundFrontEnd ( 20 )-- Play Sound On Count if n == 0 then -- on Count END triggerServerEvent ("KillAFK", getLocalPlayer()) -- Triggers Killing Function playSoundFrontEnd ( 101 ) -- Play SOund on Count END removeEventHandler ( "onClientRender" , root ,txt) -- Remove DX Text's After Count END removeEventHandler ( "onClientRender",root,You)-- Remove DX Text's After Count END end end , CountSpeed , NumToCount ) -- End Of Count Timer --- Count--- end addEvent("YouAreNotAFK",true) -- Removing Message Event addEventHandler("YouAreNotAFK",root,-- Removing Message Event function()-- Removing Message Function removeEventHandler ( "onClientRender",root,You)-- Removing Message 1 removeEventHandler ( "onClientRender" , root ,txt)-- Removing Message 2 if isTimer(timer) then killTimer(timer)-- Killing The Timer end end ) -- END of Removing Message Event --- DX ---
    1 point
×
×
  • Create New...