-
Posts
318 -
Joined
-
Last visited
Everything posted by Big Smoker
-
eu nunca mexi com sistema de blip por isso preciso de ajuda, quando eu inicio o script da erro nessa linha groupNames = getElementData(source,"Group") eu fiz ele mais preciso de ajuda pq eu nao sei muito bem como fazendo funcionar esses parametros é do col da base local ownerAccount = getAccountName(getPlayerAccount(source)) local baseName = getBaseNameFromOwnerAccount(ownerAccount) local baseExpired,day,month,year,daysRemaining,maxautos,maxaircrafts = isBaseExpired(baseName) local colshapeb = getBaseColshape(baseName)
-
consegue arrumar, só que ta kikando geral pq? olha a função addEvent("KikePlayersBase",true) addEventHandler("KikePlayersBase",getRootElement(),function(PlayerKickAcconts) local ownerAccount = getAccountName(getPlayerAccount(source)) local baseName = getBaseNameFromOwnerAccount(ownerAccount) local baseExpired,day,month,year,daysRemaining,maxautos,maxaircrafts = isBaseExpired(baseName) local colshapes = getBaseColshape(baseName) local tpx,tpy,tpz = getElementData(colshapes,"tpLoc1"),getElementData(colshapes,"tpLoc2"),getElementData(colshapes,"tpLoc3") local nameCheckKick = getPlayerName(source) local PlayerKick = removeHexCheck(nameCheckKick, 6) if colshapes and isElement(colshapes) then for i,players in pairs(getElementsWithinColShape(colshapes))do if getElementType(players) == "vehicle" then for i,player in pairs(getVehicleOccupants(players))do if players and isElement(players) then removePedFromVehicle(player) setVehicleEngineState(players,false) setElementPosition(player,tpx,tpy,tpz) end end elseif getElementType(players) == "player" then if players and isElement(players) then setElementPosition(players,tpx,tpy,tpz) end end end outputChatBox("#ffffff[#ff0000Base System#ffffff] Você expulsou o Jogador #ff0000"..PlayerKick.." #ffffffde sua Base!",source,255,255,255,true) end end) o PlayerKickAcconts ele é o que foi selecionado na grillist devo por a conde ele? pq esta kikando todos da base.
-
Preciso de ajuda nesse script. Ele mostra o blip mostrando o local da base, so aparece quem esta no "Group" so que nao da certo, nao sei o que estou fazendo de errado BaseBlibs = {} setTimer(function() groupNames = getElementData(source,"Group") if BaseBlibs[player] then for i,blip in pairs(BaseBlibs[player])do destroyElement(blip) end BaseBlibs[player] = false end if not BaseBlibs[player] then BaseBlibs[player] = {} end local ownerAccount = getAccountName(getPlayerAccount(source)) local baseName = getBaseNameFromOwnerAccount(ownerAccount) local baseExpired,day,month,year,daysRemaining,maxautos,maxaircrafts = isBaseExpired(baseName) local colshapeb = getBaseColshape(baseName) if not groupNames and isElement(groupNames) then return end BaseBlibs = {} if colshapeb and isElement(colshapeb) then local players = getElementsWithinColShape(colshapeb,"player") for i, player in pairs(players) do if groupNames == getElementData(player,"Group") then BaseBlibs = createBlipAttachedTo(baseCol,52,2,255,255,255,255,0,99999,player) table.insert(blipss[player],blipp) end end end end,1000,0)
-
o que devo fazer para corrigir-lo?
-
Bom, estou faz horas tentando arruma essa função que fiz.. é um função que mostra o nick do jogador dentro da col function refreshPlayerss(player) local thePlayers = {} local colshapes = thePlayers[tostring(getElementData(source,"BaseCol"))] if (colshapes) then for i, player in pairs(getElementData(colshapes,"players")) do table.insert(thePlayers,{getPlayerName(player)}) end end outputChatBox("REFRESH") triggerClientEvent(source,"refreshPlayers11",source,thePlayers) end addEvent("refreshPlayerss",true) addEventHandler("refreshPlayerss",getRootElement(),refreshPlayerss) esse getElementData(source,"BaseCol") é a col da base e esse getElementData(colshapes,"players") é dessa função de entrar e sair da col addEventHandler("onColShapeLeave",getRootElement(), function (hitElement,matchingDimension) if getElementData(source,"BaseCol") and matchingDimension then if getElementType(hitElement) == "player" then local players = getElementData(source,"players") if players then players[hitElement] = nil end setElementData(source,"players",players) outputChatBox("SAIU") end end end) addEventHandler("onColShapeHit",getRootElement(), function (hitElement,matchingDimension) if getElementData(source,"BaseCol") and matchingDimension then if getElementType(hitElement) == "player" then local players = getElementData(source,"players") if players then players[hitElement] = hitElement end setElementData(source,"players",players) outputChatBox("ENTROU") end end end) ah função REFRESH nao ta mostrando o nick dos players dentro da base, nao sei o que fazer mais ja tentei de tudo POR FAVOR ME AJUDA Obrigado desde já
-
Boa Tarde pessoal preciso de ajuda nessa função if getPlayerCurrentSlots() + getItemSlots(itemName) <= getPlayerMaxAviableSlots() then -- AVISO AQUI! local col = getElementData(getLocalPlayer(),"currentCol") if #getElementsWithinColShape(col,"player") > 1 or getNetworkStats().packetlossLastSecond > 1 then return end x,y,z = getElementPosition(getLocalPlayer()) if pcount ~= nil and pcount < getTickCount() then pcount = getTickCount() + 2000 x,y,z = getElementPosition(getLocalPlayer()) outputChatBox("Wait... Press '" ..tostring(key).. "' (you must not move!)",255,255,255) return false elseif pcount == nil then pcount = getTickCount() + 2000 x,y,z = getElementPosition(getLocalPlayer()) return false end local x1,y1,z1 = getElementPosition(getLocalPlayer()) if x1 ~= x or y1 ~= y or z1 ~= z then pcount = nil return false end pcount = nil triggerServerEvent("onPlayerTakeItemFromGround", getLocalPlayer(), itemName, col) setElementData(getLocalPlayer(),"loot",false) setElementData(getLocalPlayer(),"currentCol",false) disableMenu() else startRollMessage2("Inventory","Inventory is full!",255,0,0) end end O AVISO NA LINHA 1: attempt to perform arithmetic on a boollean value Obrigado desde de já
-
Preciso de ajuda nisso, no meu servidor os jogadores consegue atravessar a parece também, eu já tentei usa o acpanel para bloquear alguma coisa e unica coisa que funciono foi bloquear pelo mtaserver usando #20 que bloqueia o img nao padrão do GTA
-
ja consegui arrumar Obrigado
-
Boa noite, novamente eu estou com varios projetos em mente, e estou criando eu mesmo por isso venho aqui no forum pedir ajuda, por que eu nao gosto de pega coisa feita, gosto de aprender com meus erros... Bom mais vamos la OPS: FIZ ESSE SISTEMA DO ZERO (AGORA MESMO FIQUEI 3 HORAS FAZENDO) Fiz esse Painel de radio, nele vai ter varios IP de radios.. o jogador seleciona a radio que quer e clica em Escutar Musica (botão), e a musica começa a toca e se quiser pausar ele clica no botão (Pausar Musica)... Só que no sistema se vc fica varias vezes clicando em "escutar musica" com ip selecionado começa a toca varias vezes a radio e buga, e nao da para pausar mais, outro bug é que ele seleciona todos os IP que esta na tabela da gaveta dele ["","",""] ai começa toca varias radio junto Podem me ajudar? GuiOpen = guiCreateWindow(60, 197, 400, 470, "", false) GuiTable = guiCreateGridList(21, 34, 358, 304, false, GuiOpen) Guiesta = guiGridListAddColumn(GuiTable,"Estação da Radio",0.60) Guilocal = guiGridListAddColumn(GuiTable,"Localidade",0.35) GuiButtonPlay = guiCreateButton(21, 355, 170, 54, "Escutar Radio", false, GuiOpen) GuiButtonStop = guiCreateButton(205, 355, 170, 54, "Pausar Radio", false, GuiOpen) TbaleMusic = { ["Radios"] = { {"Sound POP","Brasil","https://radiosoundpop.com.br/ouvir/windows.asx"}, {"Jovem Pan","Brasil","http://69.175.13.131:8280"} }, ["Generos"] = { {"RAP","Brasil","http://67.228.177.4:9944/"}, {"RAP 2","Brasil","http://69.64.56.11:8130/ "}, {"Funk","Brasil","http://96.47.227.156:9122/"} }, } addEventHandler("onClientGUIClick",getRootElement(),function(Guiesta) if source == GuiButtonPlay then if SpamTime and SpamTime + 7000 > getTickCount() then return else SpamTime = getTickCount() end local Lists = guiGridListGetItemText(GuiTable,guiGridListGetSelectedItem(GuiTable)) if Lists ~= "" then for i,music in ipairs(TbaleMusic["Radios"])do sound = playSound(music[3]) setSoundVolume(sound,1) alert("Você esta escutando: "..music[3]) end for i,music in ipairs(TbaleMusic["Generos"])do sound = playSound(music[3]) setSoundVolume(sound,1) alert("Você esta escutando: "..music[3]) end end elseif source == GuiButtonStop then local ListsStop = guiGridListGetItemText(GuiTable,guiGridListGetSelectedItem(GuiTable)) if ListsStop ~= "" then for i,music in ipairs(TbaleMusic["Radios"])do sound = playSound(music[3]) setSoundVolume(sound,0) end for i,music in ipairs(TbaleMusic["Generos"])do sound = playSound(music[3]) setSoundVolume(sound,0) end end end end) function refreshList () if(Guiesta) then row1,column1 = guiGridListGetSelectedItem(GuiTable) guiGridListClear(GuiTable) local rows = guiGridListAddRow(GuiTable) guiGridListSetItemText(GuiTable,rows,Guiesta,"- Radios",true,false) for id,Radioss in ipairs(TbaleMusic["Radios"])do local Radiosssss = guiGridListAddRow(GuiTable) guiGridListSetItemText(GuiTable,Radiosssss,Guiesta,Radioss[1],false,false) guiGridListSetItemText(GuiTable,Radiosssss,Guilocal,Radioss[2],false,false) end local rowss = guiGridListAddRow(GuiTable) guiGridListSetItemText(GuiTable,rowss,Guiesta,"- Generos",true,false) for id,Radio in ipairs(TbaleMusic["Generos"])do local Radios = guiGridListAddRow(GuiTable) guiGridListSetItemText(GuiTable,Radios,Guiesta,Radio[1],false,false) guiGridListSetItemText(GuiTable,Radios,Guilocal,Radio[2],false,false) end if row1 and column1 then guiGridListSetSelectedItem(GuiTable,row1,column1) end end end Obrigado desde de já
-
Boa Tarde, precisava de uma ajuda nesse sistema que eu fiz ele cria uma caixa com as cordenadas da tabela e cria um blip marcando local onde esta a caixa SpwanLoot = { {252.67047,1802.4464,7.4140625}, {219.33887,1826.9991,6.4140625}, {261.08423,1853.5132,8.7578125}, {280.4285,1838.0157,17.648058}, } function removeLootsMilitarys (blip,Military,LootMility) if isElement(blip) then destroyElement(blip) end if isElement(Military) then destroyElement(Military) end if isElement(LootMility) then destroyElement(LootMility) end end function LootMilitarys () local item_id = math.random( 3,#SpwanLoot ) local x,y,z = SpwanLoot[item_id][1], SpwanLoot[item_id][2], SpwanLoot[item_id][3], SpwanLoot[item_id][4] Military = createObject(964,x,y,z, 0, 0, 0) outputChatBox("CRIADO") blip = createBlip ( x,y,z, 23 ) LootMility = createColSphere(x,y,z,3) attachElements(LootMility, Military, 0, 0, 0) setElementData(Military,"parent",LootMility) setElementData(LootMility,"parent",Military) setElementData(LootMility,"Loot Militar",true) setElementData(LootMility,"MAX_Slots",0) setElementData(LootMility, "MAX_Slots", 0) setTimer(removeLootsMilitarys,120000,1,blip,Military,LootMility) end setTimer(LootMilitarys,120000,0) O problema é que ele só cria 1 caixa, eu queria que ela cria-se 3 caixa (usando 3 cordenadas da tabela) Tentei usar esse aqui ate local item_id = math.random( 3,#SpwanLoot ) Obrigado
-
mtadayz {Help} GuisetText = guiCreateEdit
Big Smoker replied to Big Smoker's topic in Programação em Lua
Galera agora cortando um pouco desse assunto pode me ajuda com esse sistema que fiz pro meu servidor Esse sistema espalha 1 caixa em cada cordenada da tabela que eu fiz, olhe so function removeLootsMilitarys (blip,Military,LootMility) if isElement(blip) then destroyElement(blip) end if isElement(Military) then destroyElement(Military) end if isElement(LootMility) then destroyElement(LootMility) end end function LootMilitarys () local item_id = math.random(3,#vehSpawns["LootsMilitarys"]) local x,y,z = vehSpawns["LootsMilitarys"][item_id][1],vehSpawns["LootsMilitarys"][item_id][2],vehSpawns["LootsMilitarys"][item_id][3] Military = createObject(964,x,y,z, 0, 0, 0) outputChatBox("CRIADO") blip = createBlip ( x,y,z, 23 ) LootMility = createColSphere(x,y,z,3) attachElements(LootMility, Military, 0, 0, 0) setElementData(Military,"parent",LootMility) setElementData(LootMility,"parent",Military) setElementData(LootMility,"Loot Militar",true) setElementData(LootMility,"MAX_Slots",0) setElementData(LootMility, "MAX_Slots", 0) setTimer(removeLootsMilitarys,120000,1,blip,Military,LootMility) end setTimer(LootMilitarys,120000,0 Pra testa eu deixei de 2 em 2 min para criar a caixa e 2 min para remover, e deu certo só que ela cria 1 caixa só eu queria que cria-se 3 caixas ai de 2 em 2 min pelo SetTimer removia as 3 e trocava de lugar de volta aleatoriamente Pode ver a onde eu errei? Por favor Obrigado -
mtadayz {Help} GuisetText = guiCreateEdit
Big Smoker replied to Big Smoker's topic in Programação em Lua
uma ideia boa -
mtadayz {Help} GuisetText = guiCreateEdit
Big Smoker replied to Big Smoker's topic in Programação em Lua
Bom o que voces me indica fazer então? bloquear a troca de nick? -
mtadayz {Help} GuisetText = guiCreateEdit
Big Smoker replied to Big Smoker's topic in Programação em Lua
eu coloquei uma mensagem de texto, ate o jogador muda o nick, pois muitos fazem isso para sacanear no servidor, então quem quer realmente jogar vai alterar... pq se tem um nick menor que 4 letras ou ate mesmo com cor no nick é pq quer apronta algo, cansei de banir jogador pq colocava qualquer nick sem texto pra zoar dentro dele. então fiz esse sistema de poder kikar ele -
mtadayz {Help} GuisetText = guiCreateEdit
Big Smoker replied to Big Smoker's topic in Programação em Lua
certo muito obrigado eu tinha feito outro sistema parecido que funciono, mais vou testar esse ai deve ser melhor Obrigado -
so tem um porem esse getElementData(getLocalPlayer(),"sight") ele que seta a mira do painel, quando voce seleciona a mira e clica em aplicar mira, ai ele aplica no dxCreateTexture e o utilitarios/painel/images/false.png" so coloquei ele pra selecionar uma mira na dela, pois ficava um quadrado branco na tela ate alguem selecionar a mira por isso dava aviso
-
certo e o que devo fazer? apareceu apenas 1 vez o 0... cada vez que eu clicava aparecia 0 mais no primeiro click deu utilitarios/painel/images/false.png ai cada click que dava aparecia 0
-
Apareceu isso aqui quando mirei sem eu selecionar a mira no painel utilitarios/painel/images/false.png 0 0 0 0 0 0
-
Estou usando dentro da GM, voce tem Discord? ai podemos conversa por la vou ver o aviso que da no chat bindKey("mouse2","down",function() Crosshair_table = {} if getElementData(getLocalPlayer(),"sight") then if oldSight and oldSight == getElementData(getLocalPlayer(),"sight") then return end defaults = dxCreateTexture(getElementData(getLocalPlayer(),"sight")) oldSight = getElementData(getLocalPlayer(),"sight") Crosshair_table = dxCreateShader("utilitarios/painel/texreplace.fx") engineApplyShaderToWorldTexture(Crosshair_table, "siteM16") dxSetShaderValue(Crosshair_table, "gTexture", defaults) end end) esse erro esta apenas no script da resource, ela esta funcionando normal so que da erro a função original é essa ai fiz aquela função pra ver se ia sair o aviso
-
Sim ele esta certo, esse sistema é um painel de miras para armas (rifles,pistolas,12, etc) ele tem um monte de mira, ai vc seleciona a mira que vc quer e aplica ai nao da esse aviso.. So que esse aviso so mostra para o jogador que nao seleciono a mira então eu coloquei uma mira ate ele selecionar uma que é o default = "utilitarios\painel\images\false.png" .. So que ainda continua o aviso
-
I have a gun sight system, but it keeps warning me when I click to aim ('Mouse2') I did a function to see if the error was going to go I'm going to put the old script and what I did PLEASE WHAT SHOULD I DO? old bindKey("mouse2","down",function() Crosshair_table = {} if getElementData(getLocalPlayer(),"sight") then if oldSight and oldSight == getElementData(getLocalPlayer(),"sight") then return end defaults = dxCreateTexture(getElementData(getLocalPlayer(),"sight")) oldSight = getElementData(getLocalPlayer(),"sight") Crosshair_table = dxCreateShader("utilitarios/painel/texreplace.fx") engineApplyShaderToWorldTexture(Crosshair_table, "siteM16") dxSetShaderValue(Crosshair_table, "gTexture", defaults) end end) I did bindKey("mouse2","down",function() Crosshair_table = {} if getElementData(getLocalPlayer(),"sight") then if oldSight and oldSight == getElementData(getLocalPlayer(),"sight") then return end if default then default = getElementData(getLocalPlayer(),"sight") else default = "utilitarios/painel/images/false.png" end local defaults = dxCreateTexture(default) local oldSight = getElementData(getLocalPlayer(),"sight") Crosshair_table = dxCreateShader("utilitarios/painel/texreplace.fx") engineApplyShaderToWorldTexture(Crosshair_table, "siteM16") dxSetShaderValue(Crosshair_table, "gTexture", defaults) end end) Warning that this is the one: bad argument @'dxcreateTexture' [expecte mumber at argument 2, got none] Thank you in advance;)
-
Pode me ajuda o por que desse erro?
-
bindKey("mouse2","down",function() Crosshair_table = {} if getElementData(getLocalPlayer(),"sight") then if oldSight and oldSight == getElementData(getLocalPlayer(),"sight") then return end if default then default = getElementData(getLocalPlayer(),"sight") else default = "utilitarios/painel/images/false.png" end local defaults = dxCreateTexture(default) local oldSight = getElementData(getLocalPlayer(),"sight") Crosshair_table = dxCreateShader("utilitarios/painel/texreplace.fx") engineApplyShaderToWorldTexture(Crosshair_table, "siteM16") dxSetShaderValue(Crosshair_table, "gTexture", defaults) end end) Aviso que da é esse bad argument @'dxcreateTexture' [expecte mumber at argument 2, got none] Eu nao sabia como mostrar, mais esta ai
-
Pode me ajuda a arruma esse bug? fica dando aviso quando clico com o 'mouse2' Onde eu errei no script?
-
mtadayz {Help} GuisetText = guiCreateEdit
Big Smoker replied to Big Smoker's topic in Programação em Lua
Pode me ajuda nesse script ? nao sei o que eu fiz de errado nele era um sistema que kikava o player se tiver menos de 4 palavras no nick.. so que se o cara entrar com numero maior no jogo.. e dentro do jogo ele troca para um menor Tipo com 2 palavras (BK < um exemplo) ele nao é kikado ou s eo cara colocar um codigo de cor no nick dele o sistema nao kika ele e ele fica com nick invisivel eu que fiz ele e ta com esses bug