gabrielcosta
Members-
Posts
31 -
Joined
-
Last visited
Everything posted by gabrielcosta
-
Pessoal, como faço pra quando um player minimizar a tela, aparecer esse text em cima dele: Janela Minimizada E quando ele voltar ao jogo, sumir? Quem puder me ajudar ficarei muito grato.
-
Bom, gostaria que quando um player desse /farol, o farol dele ativasse, e quando ele escrevesse novamente, desativasse Alguém poderia me mandar este script por favor?
-
Bom, estava mexendo com o mod de /mods, de ativar e desativar texturas, coloquei os veiculos tudo certinho lá, as texturas coloquei lá só que após isso está dando meio que este erro: https://prnt.sc/u9eg7r Alguém poderia me ajudar?
-
Tem discord para eu lhe explicar melhor?
-
Está funcionando, porém ele nasce um pouco afastado e caindo no limbo, e depois volta Mas está nascendo alguns "x" longe do coordenado, como arrumar isso?
-
.
-
Bom, como eu desativei o modo play, o player novo, quando loga pela primeira vez, ele nasce em baixo da terra bugado (porque provavelmente não tem spawn setado pra ele) Então eu gostaria que alguém me ajudasse a resolver esse problema, se alguém tem algum script que possa resolver este problema Quem puder ajudar ficarei muito grato!
-
ajuda Boas-vindas em outputchatbox
gabrielcosta replied to gabrielcosta's topic in Programação em Lua
Valeuuuu -
ajuda Resource impedido de executar uma função
gabrielcosta replied to gabrielcosta's topic in Programação em Lua
Consegui resolver, foi um erro de ortografia meu, valeu pela atenção!! -
Bom, eu coloquei um script de blitz, funciona tudo certo, só que quando é para destruir a Blitz e faz dar restartResource nele mesmo para destruir uma Blitz. Porém fala que dá "acess denied" em restartResource, já coloquei ele na acl de Admin, porém não funciona. Print: https://prnt.sc/u6l5jj Quem me ajudar ficarei muito grato.
-
Bom, se alguém puder me ajudar neste problema, gostaria muito. Ele se resume em, quando um jogador entra no servidor e é redirecionado a tela de login, ele consegue apertar F1, F2, F3 e ai vai. Gostaria de retirar isso, alguém poderia ajudar?
-
Bom, alguém tem algum script de boas-vindas em outputchatbox? Que se resume em, toda vez que um jogador entrar, ele recebe no chat uma mensagem. Vai me ajudar bastante quem puder disponibilizar.
-
Bom, não está reconhecendo o id do jogador quando digita num chat, está dando N/A. Print: https://prnt.sc/u6ikjl Código do chat: ComandoDoChatGlobal = "cp" ----COMANDO PARA UTILIZAR NO CHAT Ex:( /cp OI ) function adminchat ( thePlayer, _, ... ) local message = table.concat ( { ... }, " " ) local ID = getElementData(source, "ID") or "N/A" if ( isPlayerOnGroup ( thePlayer ) ) then for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( isPlayerOnGroup ( player ) ) then conta = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Policial" ) ) then ----ACL DE QUEM VAI VER/USAR O CHAT outputChatBox("#ffFFFF| #FFA500COPOM #ffFFFF|#FFA500 "..getPlayerName(thePlayer).. " #ffffff["..ID..") » :#FFA500 "..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Policial" ) ) then ----ACL DE QUEM VAI VER/USAR O CHAT outputChatBox("#ffFFFF| #FFA500COPOM #ffFFFF|#FFA500 "..getPlayerName(thePlayer).. " #ffffff["..ID..") » :#FFA500 "..message, player, 255, 255, 255, true) end end end end setElementData ( thePlayer, "Chat:Avisado", true ) setElementData ( thePlayer, "Chat:Delay1",true ) setTimer ( setElementData, 5000, 1, thePlayer, "Chat:Delay1", false ) end addCommandHandler ( ComandoDoChatGlobal, adminchat ) -------------------------------------------------------------------------------------------- function isPlayerOnGroup ( thePlayer ) local account = getPlayerAccount ( thePlayer ) local inGroup = false for _, group in ipairs ( { "Policial" } ) do ----ACL DE QUEM VAI VER/USAR O CHAT if isObjectInACLGroup ( "user.".. getAccountName ( account ), aclGetGroup ( group ) ) then inGroup = true break end end return inGroup end
-
Bom, quando eu coloco o código para mudar a cor no dx message, ele não muda, ele só aparece o código gostaria se tem como resolver isso, print do erro: https://prnt.sc/u4hc8k Script do DX MESSAGES: local displayWidth, displayHeight = guiGetScreenSize(); local notificationData = {}; local notificationFont = dxCreateFont('font/roboto.ttf', 12 * 2, false); local iconsFont = dxCreateFont('font/icons.ttf', 12 * 2, false); addEventHandler('onClientRender', root, function() for k, v in pairs(notificationData) do if (v.State == 'fadeIn') then local alphaProgress = (getTickCount() - v.AlphaTick) / 650; local alphaAnimation = interpolateBetween(0, 0, 0, 255, 0, 0, alphaProgress, 'Linear'); if (alphaAnimation) then v.Alpha = alphaAnimation; else v.Alpha = 255; end if (alphaProgress > 1) then v.Tick = getTickCount(); v.State = 'openTile'; end elseif (v.State == 'fadeOut') then local alphaProgress = (getTickCount() - v.AlphaTick) / 650; local alphaAnimation = interpolateBetween(255, 0, 0, 0, 0, 0, alphaProgress, 'Linear'); if (alphaAnimation) then v.Alpha = alphaAnimation; else v.Alpha = 0; end if (alphaProgress > 1) then notificationData = {}; end elseif (v.State == 'openTile') then local tileProgress = (getTickCount() - v.Tick) / 350; local tilePosition = interpolateBetween(v.StartX, 0, 0, v.EndX, 0, 0, tileProgress, 'Linear'); local tileWidth = interpolateBetween(0, 0, 0, v.Width, 0, 0, tileProgress, 'Linear'); if (tilePosition and tileWidth) then v.CurrentX = tilePosition; v.CurrentWidth = tileWidth; else v.CurrentX = v.EndX; v.CurrentWidth = v.Width; end if (tileProgress > 1) then v.State = 'fixTile'; setTimer(function() v.Tick = getTickCount(); v.State = 'closeTile'; end, string.len(v.Text) * 45 + 5000, 1); end elseif (v.State == 'closeTile') then local tileProgress = (getTickCount() - v.Tick) / 350; local tilePosition = interpolateBetween(v.EndX, 0, 0, v.StartX, 0, 0, tileProgress, 'Linear'); local tileWidth = interpolateBetween(v.Width, 0, 0, 0, 0, 0, tileProgress, 'Linear'); if (tilePosition and tileWidth) then v.CurrentX = tilePosition; v.CurrentWidth = tileWidth; else v.CurrentX = v.StartX; v.CurrentWidth = 0; end if (tileProgress > 1) then v.AlphaTick = getTickCount(); v.State = 'fadeOut'; end elseif (v.State == 'fixTile') then v.Alpha = 255; v.CurrentX = v.EndX; v.CurrentWidth = v.Width; end roundedRectangle(v.CurrentX, 20, 25 + v.CurrentWidth, 25, tocolor(0, 0, 0, 150 * v.Alpha / 255), _, true); dxDrawRectangle(v.CurrentX, 20, 25, 25, tocolor(0, 0, 0, 255 * v.Alpha / 255), true); if (v.Alpha == 255) then dxDrawText(v.Text, v.CurrentX + 25 + 10, 20, v.CurrentX + 25 + 10 + v.CurrentWidth - 20, 20 + 25, tocolor(255, 255, 255, 255), 0.40, notificationFont, 'center', 'center', false, false, true); end if (v.Type == 'error') then dxDrawText('', v.CurrentX + 5, 20, v.CurrentX + 5 + 25 - 10, 20 + 25, tocolor(215, 90, 90, v.Alpha), 0.50, iconsFont, 'center', 'center', false, false, true); elseif (v.Type == 'warning') then dxDrawText('', v.CurrentX + 5, 20, v.CurrentX + 5 + 25 - 10, 20 + 25, tocolor(220, 180, 80, v.Alpha), 0.50, iconsFont, 'center', 'center', false, false, true); elseif (v.Type == 'info') then dxDrawText('', v.CurrentX + 5, 20, v.CurrentX + 5 + 25 - 10, 20 + 25, tocolor(85, 180, 245, v.Alpha), 0.50, iconsFont, 'center', 'center', false, false, true); elseif (v.Type == 'success') then dxDrawText('', v.CurrentX + 5, 20, v.CurrentX + 5 + 25 - 10, 20 + 25, tocolor(235, 154, 13, v.Alpha), 0.50, iconsFont, 'center', 'center', false, false, true); end end end ) addEvent('addNotification', true); function addNotification(text, type) if (text and type) then if (notificationData ~= nil) then table.remove(notificationData, #notificationData); end table.insert(notificationData, { StartX = (displayWidth / 2) - (25 / 2), EndX = (displayWidth / 2) - ((dxGetTextWidth(text, 0.40, notificationFont) + 20 + 25) / 2), Text = text, Width = dxGetTextWidth(text, 0.40, notificationFont) + 20, Alpha = 0, State = 'fadeIn', Tick = 0, AlphaTick = getTickCount(), CurrentX = (displayWidth / 2) - (25 / 2), CurrentWidth = 0, Type = type or 'info' } ); playSoundFrontEnd(11); end end addEventHandler('addNotification', root, addNotification); function roundedRectangle(x, y, w, h, borderColor, bgColor, postGUI) if (x and y and w and h) then if (not borderColor) then borderColor = tocolor(0, 0, 0, 200); end if (not bgColor) then bgColor = borderColor; end dxDrawRectangle(x, y, w, h, bgColor, postGUI); dxDrawRectangle(x + 2, y - 1, w - 4, 1, borderColor, postGUI); dxDrawRectangle(x + 2, y + h, w - 4, 1, borderColor, postGUI); dxDrawRectangle(x - 1, y + 2, 1, h - 4, borderColor, postGUI); dxDrawRectangle(x + w, y + 2, 1, h - 4, borderColor, postGUI); end end
-
Alguém me ajuda com este erro? https://prnt.sc/tzlgx1 Aqui está aonde eu exportei a função do resource Scripts_Dxmessages function(id) local vehicle = getVehicleByID(id) if isElement(vehicle) then local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id), -1) if type(data) == "table" and #data ~= 0 then destroyVehicle(vehicle) exports.Scripts_Dxmessages:outputDx ("#c1c1c1O seu veiculo #00FF66"..(customCarNames[data[1]["Model"]] or getVehicleNameFromModel(data[1]["Model"])).." #c1c1c1foi removido.", source, 38, 122, 216, true) else exports.Scripts_Dxmessages:outputDx ("#c1c1c1Selecione um veiculo.", source, 38, 122, 216, true) end else exports.Scripts_Dxmessages:outputDx ("#c1c1c1O seu veiculo não foi spawnado.", source, 38, 122, 216, true) end end) O erro está se referindo aqui: function outputDx(player, text, type) if (player and text and type) then triggerClientEvent(player, 'Server:CallNotifications', resourceRoot, text, type); end end
-
Eu gostaria de saber o por que quando eu vou spawnar o veículo, ele fica de lado, e não reto como faço pra arrumar isto? Posição: 1016.727355957,-1991.0718994141,13.929684638977
-
Estou quebrando a cabeça pra descubrir por que meu voice no meu servidor está saindo baixo, pra todo mundo está baixo gostaria de saber o porque, estou faz tempo querendo descubrir e não acho nada sobre isso ;-; Alguém me ajuda por favor
-
Script - Não ouvir musica em moto
gabrielcosta replied to gabrielcosta's topic in Programação em Lua
aonde posso coloca-lo? -
Deu o seguinte erro: [20-06-28 01:30:10] ERROR: [Mods]/[BVN]Chat/Chats.Lua:142: attempt to concatenate global 'MessagemT' (a nil value)