
brunob22
Members-
Posts
159 -
Joined
-
Last visited
Everything posted by brunob22
-
esses funçoes são chamadas por comando ou button?
-
bem simples. um pouco de pesguiça ajuda https://wiki.multitheftauto.com/wiki/ToggleControl
-
eu ja parei de ler os topico dele.. assim q vejo o criador, deveria aver puniçao para isso.
-
me descupe falar. mais achie esse codigo muito mal feito(bagunçado).. '-' será que foi so eu?
-
eles fazem isso com medo de roubarem o codigo dele kkk cendo que deve ser coisa bem mais bem simples de se fazer kkk e assim que o brasil funciona
-
onClientDoubleClick tudo isso que voce ta perguntando existe no wiki do mta.. sabia ne?
-
bom.. kk consegui resolver.. e seguindo sua dica de setelement.. eu colokei os valores em variavel em vez de setelement. vlw pela dica =)
-
kkkk vou tenta explicar oque eu quero fazer eo seguinte.. se tem 10 elementos na tabela ele repete a função 10 vezes. entendeu? i eu nao quero que isso aconteça eo codigo .. verificar se tem o serial na tabela. se ve se igual de quem chamo o comando.. e o setelement. preciso dele nao sei levar o elemento entre funções '-'
-
getlocalplayer
-
function ler_dadosbanco (tabela) --outputChatBox("inicio função"..numero1) local Serial1 = getElementData(getRootElement( ), "SerialPlayer") local User = getElementData(getRootElement( ), "User_data2") local Groups = getElementData(getRootElement( ), "Groupo") if (tabela) then local p = dbPoll(tabela, 0 ) for index , dados in ipairs(p) do numero1 = numero1+1 outputChatBox(Serial1) outputChatBox(dados["Serial"].." DDD") if numero1 == 1 or numero1 == 2 then if tostring(dados["Serial"]) == tostring(Serial1) then Sand_msg("Erro",User) setElementData(getRootElement( ),"STATUS", true) elseif Serial1 ~= dados["Serial"] then Sand_msg("Certo",User) setElementData(getRootElement( ),"STATUS", false) setTimer(checkgroupb2, 3000, 1,User,kk,Groups) end end end end numero1 = 0 end ESSE CODIGO EO SEGUINTE .. O SISTEMA VERIFICA SE TEM O SERIAL NA TABELA SE TIVER ELE TA ERRO MAIS SE NAO TIVER ELE TA CERTO .. MAIS SE TIVER 1 ERRO E 1 CERTO ELE ME REPORTA 1 ERRO E 2 CERTO E ASSIM REPITINDO O CODIGO 2 VEZES EU TENTEI FILTRA POR NUMERO MAIS TB NAO ROLO.. ALGUEM POR FAVOR PODE ME DAR UM ESPERANÇA? edit ex: se tiver 11 dados na mysql mais 1 somente e certo entao ele deveria me retornal 10 erros e 1 certo mais nao.. ele reporta 10 erros e 11 certo
-
[ PERGUNTA ]"Tela de loading" ou Barra carregando
brunob22 replied to MrDante's topic in Programação em Lua
como o erro ja ta falandor argumento 2 triggerServerEvent("revistar", thePlayer) theplayer eo erro. -
obrigado.. pela ajuda mais eu ja resolvi o problema =)) e tentando de explicar os valor q vai na função Remover_Auto_acl vem direto do mysql que ta armazenado a data. e assim compara com data do dia atual entendeu? e mesmo olhando o tutorial de timestamp nao entendi muito bem ele =)
-
na onde o algemar_jogador recebe o valor true?
-
function Remover_Auto_acl (Account_data,Status,Dias,Mes,Ano) if (tostring(Status) == "Unknown" ) then local tempo = getRealTime() local dia1 = tempo.monthday local mes1 = tempo.month local mes1 = mes1 + 1 local Ano1 = tempo.year local Ano1 = Ano1 + 1900 local Data_Completa = tostring(dia1.."/"..mes1.."/"..Ano1) local Data_Completa_Banco = tostring(Dias.."/"..Mes.."/"..Ano) --outputChatBox(Data_Completa) --outputChatBox(Data_Completa_Banco) if tonumber(mes1) <= tonumber(Mes) then outputChatBox(tostring(mes1)) outputChatBox(tostring(Mes)) outputChatBox( "EXPIRO") else outputChatBox( "ATIVADO") end end end alguem pelo amor de deus pode me dizer oque ta errado.. na onde tem if tonumber(mes1) <= tonumber(Mes) then ta me retornando 2 expirados.. ceno que na tabela so tem 1 valor com o mes menor doque o mes de hj '0' eu queria ter feito if tonumber(Data_Completa) <= tonumber(Data_Completa_Banco) then mais tb me reporta a mesma coisa .. '-'
-
local tempovivo = getelementdata(getlocalplayer,"alivetime") if tempovivo >= 1 then aii segue a linha eu acho que isso funciona nunca testei '-'
-
minha opnião.. nao gostei.. site muito ctrl-c | ctrl-v se donos do site nao tem capacidade para fazer um site original. entao e melhor nao confiar =) i eu acho que isso devia ser proibido aki no forum .. em fim isso e um forum de divulgação? ou uma comunidade para mta? acho que nao e pra divulgação..
-
tenta muda getElementData ( element, "alivetime" ) para getElementData ( getLocalPlayer( ), "alivetime" )
-
@rafaelel esse codigo não e seu..
-
sim. o código dele é bagunçado mesmo, mais não há quais quer necessidade para ele postar o código dele completo aqui... porque tem tanto interesse no código completo dele ? ele não quer que. o código dele seja vazado, algum problema nisso ? kkkkk eu raxo com essa pessoas .. kkkkkkk nao vou te responde pq nao me rebaixo a isso.
-
seu codigo e muito bagunçado.. e ainda por cima nao ta completo como quer ajuda se nao posta o codigo completo.
-
setrimer nao sera funcional.. porque assim que a resource for pausada o tempo deixara de exister..
-
eu sou burro kkkk mais vou tenta
-
ola gostira de saber como eu adiciono um scrollbar.. print: codigo: wx, hy = guiGetScreenSize() local x, y = wx/2, hy/2 local globalOff = 0 weight = 0 weightH = 0 itemmoving = 0 slots = 96 slotsH = 120 invLabelsTable = {} dragitem = 0 infoitem = 0 infolabel = nil descrname = false descrtype = "Comida" descr = "Restaura Fome" inventoryShowing = false loot = false --lootname = "Окружение" boxesLabels = {} invWeapLabelsTable = {} colorRED = false colorGREEN = false colorBLUE = false colorORANGE = false -- тут closeInventoryWindowCrest = nil removeWeapsWindowCrest = nil currentAdditWeap = false currentMainWeap = false currentAddClothing = false currentLabelWeapAddit = false function weapFitsInInventory ( curr, new ) local xs, ys = getItemNewSlots ( curr ) or 1, 1 local xs_new, ys_new = getItemNewSlots ( new ) or 1, 1 local finx, finy = xs_new-xs, ys_new-ys if finx < 0 then finx = 0 end if finy < 0 then finy = 0 end if checkSpaceForItem ( finx, finy ) then return true end return false end function getCurrentWeaponImage() local weap = getPedWeapon(getLocalPlayer()) if weap and weap > 0 then if weaponsTable[weap] then return weaponsTable[weap][1],weaponsTable[weap][2],weaponsTable[weap][3] end end return false end function startDraggingItem(key,state,source) if not dragging then dragging = true colorRED = false colorGREEN = false colorBLUE = false colorORANGE = false -- тут draggingMainWeap = false draggingAdditWeap = false if isElement(currentLabelSelf) then local row = getElementData ( currentLabelSelf, "row" ) local column = getElementData ( currentLabelSelf, "column" ) if inv[row][column] > 0 then dragitem = inv[row][column] if inventory[inv[row][column]][10] then draggingAdditWeap = inventory[inv[row][column]][1] end currentLabelOwner = 1 end elseif isElement(currentLabelHim) then local row = getElementData ( currentLabelHim, "row" ) local column = getElementData ( currentLabelHim, "column" ) if invH[row][column] > 0 then dragitem = invH[row][column] if inventoryH[invH[row][column]][9] then draggingMainWeap = true end currentLabelOwner = 2 end elseif isElement(currentLabelWeap) then dragitem = 1 currentLabelOwner = 3 elseif isElement(currentLabelWeapAddit) then dragitem = 1 currentLabelOwner = 4 end if not bindKey ( 'mouse1', 'up', finishDragging ) then bindKey ( 'mouse1', 'up', finishDragging ) end end end function finishDragging () if not dragging then return true end dragging = false if dragitem == 0 then return true end if onBoxItem and isElement ( onBoxItem ) then local id = getElementData ( onBoxItem, "boxLabelID" ) if id then if currentLabelOwner == 2 then return true elseif currentLabelOwner == 1 then local xs, ys = inventory[dragitem][2], inventory[dragitem][3] if inventory[dragitem][8] then xs, ys = 1, 1 end setElementData ( getLocalPlayer(), "fb"..id, inventory[dragitem][1] ) boxesItems[id] = { inventory[dragitem][1], inventory[dragitem][4], xs, ys } elseif currentLabelOwner == 3 then local weap = getItemData (currentMainWeap) local xs, ys = weap[2], weap[3] setElementData ( getLocalPlayer(), "fb"..id, weap[1] ) boxesItems[id] = { weap[1], weap[6], weap[2], weap[3] } elseif currentLabelOwner == 4 then local weap = getItemData (currentAdditWeap) local xs, ys = weap[2], weap[3] setElementData ( getLocalPlayer(), "fb"..id, weap[1] ) boxesItems[id] = { weap[1], weap[6], weap[2], weap[3] } end end dragitem = 0 return true end if onWeaponLabel then if currentLabelOwner == 2 then return true end for i,itemInfo in ipairs(inventoryItems["Weapons"]["Primary Weapon"]) do if inventory[dragitem][1] == itemInfo[1] then currentMainWeap = itemInfo[1] useItems(inventory[dragitem][1],"Pegue a arma principal") setGlobalOff() dragitem = 0 return true end end for i,itemInfo in ipairs(inventoryItems["Weapons"]["Secondary Weapon"]) do if inventory[dragitem][1] == itemInfo[1] then useItems(inventory[dragitem][1],"Pegue armas extra") currentAdditWeap = itemInfo[1] setGlobalOff() dragitem = 0 return true end end for i,itemInfo in ipairs(inventoryItems["Weapons"]["Specially Weapon"]) do if inventory[dragitem][1] == itemInfo[1] then useItems(inventory[dragitem][1],"Pegue armas especiais") dragitem = 0 return true end end for i,itemInfo in ipairs(inventoryItems["Weapons"]["Pistols"]) do if inventory[dragitem][1] == itemInfo[1] then useItems(inventory[dragitem][1],"Pegue armas peças") dragitem = 0 return true end end end if isElement ( currentLabelSelf ) and currentLabelOwner == 2 then -- если перетаскиваем из лута в FERRAMENTAS local csx, csy = 1, 1 if not inventoryH[dragitem][8] then csx, csy = inventoryH[dragitem][2], inventoryH[dragitem][3] end if not draggingMainWeap then if checkSpaceForItem ( csx, csy ) then moveItemInInventory ( inventoryH[dragitem][1] ) setTimer ( refreshItemsInNewInventory, 500, 1, true ) else triggerEvent("displayClientInfo",getLocalPlayer(),"inventory","O assunto não se encaixa",22,255,0) end else if currentMainWeap then dropCurrentWeapon() end moveItemInInventory ( inventoryH[dragitem][1] ) end elseif isElement ( currentLabelSelf ) and currentLabelOwner == 1 and colorORANGE and cur_craft_recipe then -- если крафт тут showRightClickCraftMenu () draggingAdditWeap = false dragitem = 0 return true elseif isElement ( currentLabelSelf ) and currentLabelOwner == 4 then -- если перетаскиваем из Frioго оружия в FERRAMENTAS if colorGREEN then setElementData ( getLocalPlayer(), "currentweapon_2", "noweap" ) -- обнуляем текущее Frioе оружие currentAdditWeap = false setGlobalOff() refreshItemsInNewInventory() -- обновляем список предметов end elseif isElement ( currentLabelWeapAddit ) and currentLabelOwner == 1 and draggingAdditWeap then -- если перетаскиваем из инвентаря в Frioе оружие useItems(draggingAdditWeap,"Pegue armas extra") elseif isElement ( currentLabelWeap ) and currentLabelOwner == 2 then -- если перетаскиваем из лута в огнестрел if currentMainWeap then dropCurrentWeapon() -- выбрасываем текущее основное оружие end moveItemInInventory ( inventoryH[dragitem][1] ) elseif isElement ( currentLabelHim ) and currentLabelOwner == 1 then -- если перетаскиваем из инвентаря no saque local csx, csy = 1, 1 if not inventory[dragitem][8] then csx, csy = inventory[dragitem][2], inventory[dragitem][3] end if checkSpaceForItemH ( csx, csy ) then moveItemOutOfInventory ( inventory[dragitem][1] ) setTimer ( refreshItemsInNewInventory, 500, 1, true ) else triggerEvent ("displayClientInfo",getLocalPlayer(),"inventory","O assunto não se encaixa no saque",22,255,0) end elseif isElement ( currentLabelHim ) and currentLabelOwner == 3 then -- если перетаскиваем из огнестрела no saque local weap = getItemData (currentMainWeap) if checkSpaceForItemH ( weap[2], weap[3] ) then moveItemOutOfInventory ( weap[1] ) setTimer ( refreshItemsInNewInventory, 500, 1, true ) else triggerEvent ("displayClientInfo",getLocalPlayer(),"inventory","O assunto não se encaixa no saque",22,255,0) end elseif isElement ( currentLabelHim ) and currentLabelOwner == 4 then -- если перетаскиваем из огнестрела no saque local weap = getItemData (currentAdditWeap) if checkSpaceForItemH ( weap[2], weap[3] ) then moveItemOutOfInventory ( weap[1] ) setTimer ( refreshItemsInNewInventory, 500, 1, true ) else triggerEvent ("displayClientInfo",getLocalPlayer(),"inventory","O assunto não se encaixa no saque",22,255,0) end end draggingAdditWeap = false dragitem = 0 end function itemLabelLeaved () currentLabelSelf = false currentLabelHim = false infoShowing = false currentLabelWeap = false onWeaponLabel = false currentLabelWeapAddit = false colorRED = false -- если тормозит при перемещении вещей, то убрать colorGREEN = false -- если тормозит при перемещении вещей, то убрать colorBLUE = false -- если тормозит при перемещении вещей, то убрать colorORANGE = false -- тут if isTimer ( infotimer ) then killTimer (infotimer) end end function checkCraftingRecipes ( items_given )
-
Sendo que getElementData(col,"parent") retorna true e não um elemento, que deveria ser, então o erro está aí. Isso quer dizer, que está sendo passado o valor booleano true na linha 12. ja consegui resolver o problema fiz uma ganbiarra br mais ta funfando kk =) vlw ai man..
-
alguem poderia me ajudar? function inventarioarmabox01 () local x = guiGridListGetItemText(gridlist["armabox1"], guiGridListGetSelectedItem(gridlist["armabox1"]), 1) for i, col in ipairs(getElementsByType("colshape")) do local tnt = getElementData(col,"Armabox") if tnt then local rx,ry,rz = getElementPosition(col) if tostring(rx) == tostring(x) then for index , armabox01 in ipairs(armabox1) do local controledebug = getElementData(col,"parent") local col01 = getElementData(getElementData(col,"parent"), armabox01[1]) outputChatBox(tostring(col01)) outputChatBox(armabox01[1]) outputChatBox(tostring(controledebug)) --guiGridListSetItemText(gridlist["armabox1_inventario"], row, gridlist["armabox1_inventario_coluna"], itemName, false,false) --[[for index , items in ipairs(itemsdatatable["Segundaria"]) do local item = getElementData(getElementData(TheTent, "parent"), items[1]) if item then if item >= 1 then ItemId = createIdForItem1(items[1]) local itemName = createItemForId1(ItemId) local row = guiGridListAddRow(gridlist["armabox1_inventario"]) guiGridListSetItemText(gridlist["armabox1_inventario"], row, gridlist["armabox1_inventario_coluna"], itemName, false,false) end end end]] end end end end end o codigo desse jeito o codigo outputChatBox(tostring(col01)) retorna false --- == preciso que esse me retorne numero para sim continua o codigo o codigo outputChatBox(armabox01[1]) retorna a tabela o codigo outputChatBox(tostring(controledebug)) me reporta true