Leaderboard
Popular Content
Showing content with the highest reputation on 15/12/18 in all areas
-
2 points
-
Actually my Friend got banned aswell for Trainer for no reason. Happens a lot in last time as I see. My friend told me he just opend his GTA V. Let's see if theres something wrong :31 point
-
I need information. I want the information to be complete when you create the topic. I need information because I don't understand your topic. If you "need script because you don't understand mtawiki.com" then I'm afraid you're in the wrong place. If you want someone else to do it for them, you better pay, or go look on Facebook maybe you'll have more luck there.1 point
-
thank you for your support ? i had some problems with my code. Now everything works amazing1 point
-
اضغط علامة الويندوز في الكيبورد + حرف ق اكتب services.msc ابحث علي windows update وشغلها1 point
-
1 point
-
type == 0 Wrong ! type مش معرفة الـ addEventHandler("onPlayerChat", root , function (_, type) if type == 0 then cancelEvent() end)1 point
-
على اساس انت الي مسوي المود, اسكت بس عطيناك وجه زيادة وكتبنا بالموضوع انو انت الي مسويه1 point
-
After you destroyed an element. A saved userdata reference will remain inside of the Lua memory. A userdata reference is not an element itself. It is a value that can be used to refer to an element in MTA. ------ It is like having a cat which you named `miauw`. After it died of old age, you can still refer to your precious cat by calling it's name. `miauw` I have dinner for you! (calling function: giveCatFoot(cat)) And then your grandma reminds you of the fact that it has already died... (warning: element does not exist) ------- That is sort of how userdata references work. See function isElement for userdata validation. isElement1 point
-
1 point
-
Não adianta nada vc pegar código pronto se não entender como ele funciona. E percebo que vc está com dificuldade para entender coisas realmente simples de sintaxe. Você não vai conseguir aprender nada sem antes saber a lógica de programação. Se quiser, te passo um link de uma série de vídeo-aulas no YouTube que ensina lógica de programação e algoritmos.1 point
-
Por isso o @Lord Henry sugeriu que estude melhor a estrutura da linguagem, para que aprender a LER o código, no seu estado atual, é como se um semi-analfabeto tentasse ler um artigo penal. Mas o código pronto com a função do @MaligNos seria somente: function qtsElementData(dataname) local qtd = 0 for _,p in ipairs(getElementsByType("player")) do if getElementData(p,dataname) then qtd = qtd + 1 end end return qtd end function Verifica_Roubo(source) if isElementWithinMarker( source, Atendente) then --guarda1 = exports.slothbot:spawnBot (865.3115234375, -1368.9912109375, 14.996451377869, 270, 113, 0, 0, policial, 31, "waiting", true ) local theTeam = getTeamFromName("PM") if theTeam then if countPlayersInTeam(theTeam) >= 0 then if qtsElementData("nomeDaData") == 5 then --if getElementModel( element ,theElement ) setElementPosition( Atendente, 854.6572265625, -1372.029296875, 14.996742248535 -5 ) setPedAnimation(source, "SHOP", "ROB_Loop_Threat", 10000, true, false, false, false) setPedRotation(source, 360 ) setPedAnimation( ped, "SHOP", "SHP_Rob_HandsUp") BancoRoubado = createBlipAttachedTo(Atendente, 36) setTimer (function() outputChatBox("#000000[#FF0000ATENÇÃO#000000]#FFFFFFO Portão abrira em #FF000030 segundos#FFFFFF!!!", source, 0, 255, 0, true) setTimer(function() outputChatBox("#000000[#FF0000ATENÇÃO#000000]#FFFFFFO Portão abrira em #FF000020 segundos#FFFFFF!!!", source, 0, 255, 0, true) setTimer(function() outputChatBox("#000000[#FF0000ATENÇÃO#000000]#FFFFFFO Portão abrira em #FF000010 segundos#FFFFFF!!!", source, 0, 255, 0, true) moveObject( Porta1, 2930, 854.40002441406, -1368.5, 16.60000038147) moveObject( Porta2, 2930, 870.09997558594, -1368.5, 16.60000038147) outputChatBox("#000000[#FF0000ATENÇÃO#000000]#FFFFFFO Portão abriu!!!", source, 0, 255, 0, true) Cofre = createObject(2634, 850.2998046875, -1375, 23, 0, 0, 90) Marker_Cofre = createMarker(849.7685546875, -1375, 22.9964427948 -1, "cylinder", 2, 255 ,0 ,0, 255) triggerClientEvent ( root, "roubar", root) end, 30000, 1) end, 20000, 1) end, 10000, 1) else exports.dxmessages:outputDx(source,"#FF0000[ATENÇÃO] #FFFFFFÉ necessário 5 jogadores no marker para realizar o assalto.", source, 255, 255, 255, true) end else exports.dxmessages:outputDx(source,"#FF0000[ATENÇÃO] #FFFFFFPrecisa ter 5 PM online para roubar!!!", source, 255, 255, 255, true) end end end end addCommandHandler("assaltar", Verifica_Roubo)1 point
-
If I understood it correctly, you can use a table with the ranks as key and the rank color in their value: local ranksColor = { ["Sinour"] = "#f5dd42Sinour", ["Juniour"] = "#f59b42Juniour" } So, try this: local ranksColor = { ["Sinour"] = "#f5dd42Sinour", ["Juniour"] = "#f59b42Juniour" } -- to keep the the default text color you set local oTextColor = RGBToHex(0, 128, 192) or "#ffffff" outputChatBox("|SWAT| ["..(ranksColor[Rank] or "nil") .. oTextColor .."] #00ff00" .. getPlayerName ( source ) .. " #0000FF:#ffFFff " .. text, getRootElement(), 0, 128, 192, true ) -- wiki.multitheftauto.com/wiki/RGBToHex function RGBToHex(red, green, blue, alpha) -- Make sure RGB values passed to this function are correct if( ( red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255 ) or ( alpha and ( alpha < 0 or alpha > 255 ) ) ) then return nil end -- Alpha check if alpha then return string.format("#%.2X%.2X%.2X%.2X", red, green, blue, alpha) else return string.format("#%.2X%.2X%.2X", red, green, blue) end end1 point
-
@danblemes1 Seria melhor você criar só 1 tópico pra um assunto, senão fica o mesmo código em outros tópicos. Sobre o seu problema, acho que que deve usar primeiro código que o OverKILL postou e depois mostrar o elemento para o elemento-alvo, tente: function pedir (splayer) local players = getElementsByType ("player") local blip = createBlipAttachedTo (splayer, 62) setElementVisibleTo (blip, root, false) -- oculta o blip para todos elementos for _, driver in ipairs (players) do local account = getAccountName (getPlayerAccount(driver)) if isObjectInACLGroup ("user."..account, aclGetGroup ("UBER")) then setElementVisibleTo (blip, driver, true) -- mostra o blip para todos do grupo "UBER" end end end addCommandHandler ("uber", pedir)1 point
-
1 point
-
-- client side function teste() outputChatBox("estou na acl") end addEvent( "addBind", true ) addEventHandler( "addBind", localPlayer, function() bindKey ( "M", "up", teste ) end ) addEventHandler( "onClientResourceStart", resourceRoot, function() if getKeyBoundToFunction( teste ) ~= "M" then triggerServerEvent ( "upRequest", localPlayer ) end end ) -- server side addEventHandler ( "onResourceStart", resourceRoot, function() for _, thePlayer in ipairs(getElementsByType("player")) do if estaAcl(thePlayer,"BOPE") then triggerClientEvent ( thePlayer, "addBind", thePlayer ) end end end ) addEventHandler("onPlayerLogin", root, function() local thePlayer = source if estaAcl(thePlayer,"BOPE") then triggerClientEvent ( thePlayer, "addBind", thePlayer ) end end ) function estaAcl(thePlayer, acl) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( acl ) ) then return true end return false end addEvent( "upRequest", true ) addEventHandler( "upRequest", root, function() local thePlayer = client if estaAcl(thePlayer,"BOPE") then triggerClientEvent ( thePlayer, "addBind", thePlayer ) end end )1 point
-
timers = {} function Salir() if isElement(tableVehicles[source]) then destroyElement(tableVehicles[source]) if timers[source] then killTimer(timers[source]) end timers[source] = setTimer ( removeVehicle, 1000, 1, source ) end end function removeVehicle(player) destroyElement(tableVehicles[player]) tableVehicles[player] = nil end addEventHandler("onPlayerVehicleExit",getRootElement(),Salir) Also, next time please use https://forum.multitheftauto.com/forum/71-scripting/ or the corresponding scripting section for your language (Which from what I can tell is obviously not English.)1 point
-
Você precisa aprender tabelas e loops. local janelas = { { titulo = "Mission Description", memo = "You must kill 50 zombies in area 51\n\n \n Reward\nMoney: R$ 5,000.00 \nEXP : 3555 " }, { titulo = "Mission Description", memo = "123456" }, { titulo = "Mission Description", memo = "KEVIN" } } local elementos = { window = {}, btns = {}, } addEventHandler("onClientResourceStart", resourceRoot, function() for i,janela in ipairs(janelas) do wnd = guiCreateWindow(939, 156, 196, 329, janela.titulo, false) elementos.window[wnd] = i-1 guiSetVisible (wnd, false) guiWindowSetSizable(wnd, false) guiCreateMemo(9, 32, 175, 196, janela.memo, false, wnd) btnExit = guiCreateButton(10, 280, 174, 40, "EXIT", false, wnd) btnCopy = guiCreateButton(9, 233, 175, 37, "COPY", false, wnd) elementos.btns[btnExit] = {wnd,"exit"} elementos.btns[btnCopy] = {wnd,"copy"} end end ) addEventHandler ("onClientGUIClick", resourceRoot, function (button, state, absoluteX, absoluteY) if (elementos.btns[source]) then if (elementos.btns[source][2] == "exit") then guiSetVisible (elementos.btns[source][1], false) end end end) addEventHandler ("onClientGUIClick", resourceRoot, function (button, state, absoluteX, absoluteY) if (source == info) then for wnd, id in pairs(elementos.window) do if (id == guiGridListGetSelectedItem(ListMissions)) then guiSetVisible (wnd, true) else guiSetVisible (wnd, false) end end end end)1 point
-
انصحك تكون بدايتك بالتعديل بعدين و انت تعدل تيجي هنا و تشوف وش فوائد كل كود من الاكواد بداية جميع المبرمجين1 point
-
1 point
-
السلام عليكم ورحمة الله وبركاته كل عام وانتم بالف خير # بسم الله الرحمان الرحيم , مود التخيم فكرة جديد كليا # @#Al3aGraB<3 هام : حقوقك فكرة الخيمة لاخ طبعا هاذا المود كان في سيرفري وفي بعض الاشخاص قلدو المود وطالما مقفل سيرفري قلت بشاركم في المود وانشاء الله يعجبكم طبعا بسوي تحديثات له طبعا مشان تاكيد حقوقي للمود هاذا الرابط للمود زمان كنت مركبه في سيرفر # نبدء في المهم # هام : للانتقال الى التخيم اكتب في الشات ( تخيم ) , لوضع الخيمة وانزال الدباب اكتب في ف8 ( خيمة ) وشكرا صور المود انشاء الله يكون عاجبكم [ واخيرا التحميل للتحميل اضغط هنا [ كل عام وانتم بخير1 point
