-
Posts
251 -
Joined
-
Last visited
-
Days Won
7
Everything posted by Angelo Pereira
-
Lado do client, a animação não aparece-rá para os demais players, você precisa enviar, a animação para o server-side, para sincronizar a animação com os demais jogadores. Por nada, estamos aqui para ajudar-lo
-
Praticamente o problema dele é quando um servidor utiliza DxCreateFont para criar uma nova fonte em um painel, e acaba, o PC dela não carregando esta fonte, e por este motivo, acaba não aparecendo dxDrawText que utilizem esta nova fonte, porquê, para ele da erro ao carregar. Obs: Eu ajudei a identificar o problema, verificamos vários servidores, até o meu, e o problema persistiu, então não é um problema nos servidores, e sim no client(ele). Porém, eu não sei uma possível correção vindo dele, apenas sei que servidores possam utiliza após criar a fonte or "default" para aqueles, que não consigam carregarem suas fontes, para não ter esses problemas.
- 11 replies
-
- 1
-
-
- resolution
- configuração
-
(and 5 more)
Tagged with:
-
Isso ocorre em todos os servidores? este problema? ou somente em 1? caso for, caso de erros, você deve informa o problema ao dono do servidor, o que logs vai informar, são possíveis erro do servidor, onde não podemos ajudar, apenas os desenvolvedores do servidor.
- 11 replies
-
- resolution
- configuração
-
(and 5 more)
Tagged with:
-
Delete o arquivo, e entre novamente no servidor, e fique de olhos nos erros/warnings decorrentes avistados neste logs, e após da o problema nos painéis, verifique se vai da algum flood de erro neste logs, este logs serve para lista todos erros do lado do client(você) em qualquer resource do lado do client do servidor.
- 11 replies
-
- resolution
- configuração
-
(and 5 more)
Tagged with:
-
Ha agora explicou, bom nesse caso você vai precisa trabalha no script que seta o elementos, mas, como assim ? Por exemplo, ao pegar uma arma, ele seta o elemento, certo? então você vai precisa adicionar uma verificação de qual skin ele pegou e coloca assim : Exemplo : if isElement(skin1) then setElementData(_,"currentweapon_1", "M4A1") elseif isElement(skin2) then setElementData(_,"currentweapon_1", "M16") end Bom, eu não sei como funciona o seu script de várias skins, deve, ao trocar, poder setar algo, você trabalha nisso, e faz a verificação direto neste trigger. Para poder ajuda além, precisa enviar os códigos necessários, ou, aguarde alguém que já tenha conhecimento sobre.
-
Como assim são armas duplicadas? [DÚVIDA]. Enfim, tente assim : local arma = "" if getElementData( killer, "currentweapon_1" ) then arma = "M4A1" elseif getElementData( killer, "currentweapon_2" ) then arma = "Nome da 2 Arma" elseif getElementData( killer, "currentweapon_3" ) then arma = "Nome da 3 Arma" elseif getElementData( killer, "currentweapon_4" ) then arma = "Nome da 4 Arma" elseif getElementData( killer, "fists" ) then arma = "Punho" end triggerClientEvent ( "onRollMessageStart", getRootElement(),"#FF4500"..getPlayerName(source).." #FFA500Foi Morto por: #FF4500"..getPlayerName(killer).." #FFA500Pela Arma: #FFA500( #FF4500"..arma.."#FFA500)",255,0,0, "died")
-
Remover objeto da mão, animação flicando
Angelo Pereira replied to Deniel's topic in Programação em Lua
Bom, muitas coisas eu não entendi no seu script, são elas : Tabelas para timer + createObjeto. 1 timer de 0,5s executando infinitas repetições Dei uma arrumada no código : local aberto = false -- local phone = {} Não é necessário usar uma tabela para criar um objeto no client nesta ocasião. -- local animTimer = {} Não é necessário usar uma tabela para um timer no client nesta ocasião. function abrircelular () if aberto == false then aberto = true setPedAnimation (localPlayer, "ped","phone_in", 1000, false, false, false, true) setPedAnimationProgress(localPlayer, "phone_in", 0.8) setPedWeaponSlot(localPlayer, 0) phone = createObject(330, 0, 0, 0, 0, 0, 0) exports.bone_attach:attachElementToBone(phone, localPlayer, 12, 0, 0.01, 0.03, -15, 270, -15) setElementDimension(phone, getElementDimension(localPlayer)) setElementInterior(phone, getElementInterior(localPlayer)) animTimer = setTimer(function() --/> Não entendi a funcionalidade disto. setPedAnimationProgress(localPlayer, "phone_in", 0.8) end, 500, 0) else removePhone() end end bindKey ( "F1", "down", abrircelular) addCommandHandler ( "celular", abrircelular) function removePhone () if aberto == true then if isElement(phone) then destroyElement(phone) end if isTimer(animTimer) then killTimer(animTimer) end aberto = false setPedAnimation (localPlayer, "ped", "phone_out", 50, false, false, false, false) end end addEvent("remover_celular", true) addEventHandler("remover_celular", getRootElement(), removePhone ) -
Boa, faça o seguinte, ao acontecer o problema, de /debugscript 3 no F8 caso você seja administrador(a) , informe os erros/warnings obtidos aqui + código do script. caso você não seja, siga no diretório do MTA C:\Program Files (x86)\MTA San Andreas 1.5\MTA\logs e abra clientscript.logs. Observação : Primeiro limpe o clientscript antes de entrar no MTA. Creio eu, que não seria um BUG do MTA, se tratando de um SCRIPT que possa está mal configurado.
- 11 replies
-
- resolution
- configuração
-
(and 5 more)
Tagged with:
-
Basta apenas apaga o arquivo .db que é gerado na mesma pasta do seu resource da loja, faça isso com o resource desligado.
-
--/> Exemplo para 2 Grupos ACL, Para Adicionar +, Adicione or isObjectInACLGroup ("user."..account, aclGetGroup ( "Console" )), igual abaixo : function limparchat( source ) local account = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup ("user."..account, aclGetGroup ( "Admin" )) or isObjectInACLGroup ("user."..account, aclGetGroup ( "Moderator" )) then outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox (" ", root, 255, 255, 255, true ) outputChatBox( "#00FF00ᴏ ᴄʜᴀᴛ ғᴏɪ ʟɪᴍᴘᴏ ᴘᴏʀ #FFFF00"..getPlayerName(source).." #FF0000!!!", root, 255, 255, 255, true) else outputChatBox ( "#00FF00Voce nao e da staff!!!", source, 255, 255, 255, true ) --/> Arrumado end end addCommandHandler( "chat", limparchat )
-
Linha 52 - Não é dada nenhuma ACL, apenas é dado uma variável , que não existe no seu script Adicione acima da função : local Acesso_ADM = "Admin" Linha 301/306 - Necessita de permissão ACL, adicione o script a ACL Admin ou em alguma ACL com permissões "aclGroupAddObject" e "aclGroupRemoveObject". Adicione na acl Admin : resource.nome_do_seu_resource
-
Animação de abrir celular e fechar por bind
Angelo Pereira replied to Deniel's topic in Programação em Lua
Só lembrando o variável aberto deverá ser dado como tabela por ser do lado servidor, se não, essa variável ficará global. -- Server-side local aberto = {} function abrircelular (thePlayer) if not aberto[thePlayer] then aberto[thePlayer] = true setPedAnimation(thePlayer, "ped", "phone_in", -1, false, false, false, false) --/> Atender elseif aberto[thePlayer] then setPedAnimation(thePlayer, "ped", "phone_out", -1, false, false, false, false) --/> Desligar aberto[thePlayer] = nil end end function abrircelular2 (thePlayer) bindKey ( thePlayer, "F1", "down", abrircelular ) end addCommandHandler ( "celular", abrircelular2 ) E colocar isto ao lado do client-side, precisará fazer alterações : -- Client-Side local aberto = false function abrircelular () if aberto == false then aberto = true setPedAnimation(localPlayer, "ped", "phone_in", -1, false, false, false, false) --/> Atender Celular elseif aberto == true then setPedAnimation(localPlayer, "ped", "phone_out", -1, false, false, false, false) --/> Guardar Celular aberto = false end end function abrircelular2 () bindKey ( "F1", "down", abrircelular ) end addCommandHandler ( "celular", abrircelular2 ) -
Faça o seguinte, baixe e instale este voice, e faça o seguinte : 1. Remova outro resource de voice 2. Aperte f8, de refresh, e depois adicione o resource de voice, e depois da outro refresh, e da start voice. 3. Caso persistir, verifique se a outro recurso que tenha a mesma utilização de voice, que possa está interferindo no voice, neste caso, você precisará saber qual resource está interferindo, e então faça, de stop um por um, e deixe apenas o voice ligado, e verifique se o problema vai persistir.
-
Duvida sobre carregamento de tendas e veiculos
Angelo Pereira replied to Lukkas2201's topic in Programação em Lua
Tente isso : Cole está função abaixo da função loads_tents. function start_resource () dbQuery(load_tents, {}, db, "SELECT * FROM `tents`") dbQuery(load_vehs, {}, db, "SELECT * FROM `vehicles`") end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), start_resource) Apenas exemplo Demostrativo de onde colocar : function load_vehs(q) if (q) then local p = dbPoll(q, 0); if (#p > 0) then for _,d in pairs(p) do last_veh_id = d["id"]; create_veh(d["model"], d["x"], d["y"], d["z"], d["rX"], d["rY"], d["rZ"], d["slots"], d["fuel"],d["receiver"], d["armorPoints"], d["armorPointsMax"], d["engines"], d["moving"], d["parts"], d["items"], d["id"]); end end end noteAdmins("Veiculos Carregados!"); end function load_tents(q) if (q) then local p = dbPoll(q, 0); if (#p > 0) then for _,d in pairs(p) do last_tent_id = d["id"]; create_tent(d["model"], d["x"], d["y"], d["z"], d["rX"], d["rY"], d["rZ"], d["slots"], d["scale"], d["items"], d["id"]); end end end noteAdmins("Tendas Carregadas!"); end function start_resource () --/> AQUI dbQuery(load_tents, {}, db, "SELECT * FROM `tents`") --/> AQUI dbQuery(load_vehs, {}, db, "SELECT * FROM `vehicles`") --/> AQUI end --/> AQUI addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), start_resource) --/> AQUI -
-- /> Utilize : engineSetModelLODDistance ( model , distance ) model: o número de ID do modelo / objeto do qual você deseja alterar a distância do LOD. distance: novo valor da distância LOD nas unidades de San Andreas.
-
TopList
Angelo Pereira replied to Vitor Hugo's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
Você precisa aguardar, e quando liberar a toplist, o MTA enviará um e-mail para o seu e-mail informado no site ou no mtaserver.conf. Eu acho que você se equivocou-se e entendeu errado o tópico, toplist tem relação com o MTA, sendo ela, a responsável por fornecer o produto TopList. -
Não consigo utilizar o setElementPosition.
Angelo Pereira replied to noonbr's topic in Programação em Lua
Caso, a do MainSCR não funcionar, tente assim : function checkPointFinal(hitElement, d) if isElement(hitElement) and getElementType(hitElement) == "player" and d then if isPedInVehicle(hitElement) then --/> Adicionado if getElementData(hitElement, "checkpoint3") then destroyElement(getPedOccupiedVehicle(hitElement)) setElementVisibleTo(blip2, hitElement, false) setElementVisibleTo(blip3, hitElement, false) setElementVisibleTo(blip4, hitElement, false) setElementVisibleTo(blip5, hitElement, false) setElementVisibleTo(job2, hitElement, false) setElementVisibleTo(job3, hitElement, false) setElementVisibleTo(job4, hitElement, false) setElementVisibleTo(job5, hitElement, false) setElementData(hitElement, "checkpoint1", false) setElementData(hitElement, "checkpoint2", false) setElementData(hitElement, "checkpoint3", false) setElementData(hitElement, "checkpoint4", false) setElementData(hitElement, "jobIniciar", false) givePlayerMoney(hitElement, 500) outputChatBox("Debitados R$500,00.", hitElement, 0, 250, 0) outputChatBox("Digite /iniciar no marcador para fazer a corrida novamente.", hitElement, 0, 220, 0) setTimer ( function () --/> Adicionado setElementPosition(hitElement, 1714.3785400391, -1949.0649414063, 14.1171875) end, 200, 1) --/> Adicionado end --/> Adicionado end end end addEventHandler("onMarkerHit", job5, checkPointFinal) -
--/> Client-Side local screenW,screenH = guiGetScreenSize() local resW, resH = 1280, 960 local x, y = (screenW/resW), (screenH/resH) local painel = false function dx_Painel () if painel == true then dxDrawRectangle(x*358, y*144, x*631, y*420, tocolor(0, 0, 0, 197), false) dxDrawRectangle(x*358, y*144, x*631, y*47, tocolor(0, 0, 0, 203), false) dxDrawText("Divinity Police",x*519, y*145, x*833, y*191, tocolor(254, 254, 254, 203), 1.50, "pricedown", "center", "center", false, false, false, false, false) dxDrawRectangle(x*358, y*243, x*632, y*58, tocolor(61, 61, 61, 203), false) dxDrawRectangle(x*358, y*347, x*632, y*58, tocolor(61, 61, 61, 203), false) dxDrawRectangle(x*358, y*438, x*632, y*58, tocolor(61, 61, 61, 203), false) dxDrawText("Pegar equipamentos", x*518, y*253, x*832, y*299, tocolor(254, 254, 254, 203), 1.50, "pricedown", "center", "center", false, false, false, false, false) dxDrawText("Guardar equipamentos", x*515, y*357, x*829, y*403, tocolor(254, 254, 254, 203), 1.50, "pricedown", "center", "center", false, false, false, false, false) dxDrawText("Pegar viatura", x*515, y*448, x*829, y*494, tocolor(254, 254, 254, 203), 1.50, "pricedown", "center", "center", false, false, false, false, false) dxDrawText("X", x*915, y*153, x*961, y*185, tocolor(255, 255, 255, 255), 3.00, "default", "center", "center", false, false, false, false, false) end end function abrir_painel () if painel == false then addEventHandler("onClientRender", getRootElement(), dx_Painel) painel = true end end addEvent("Event:Abrir_Painel_Police", true) addEventHandler("Event:Abrir_Painel_Police", getRootElement(), abrir_painel) function fechar_painel () --/> Fechar o Painel / Não Esta Funcional é um Exemplo, Precisará Implementa no seu Script. if painel == true then painel = false removeEventHandler("onClientRender", getRootElement(), dx_Painel) end end --/> Server-Side local marker = createMarker (1539.21252, -1647.53589, 4.89063, "cylinder", 1.5 ,50,100,100) function abrir_painel (hitElement) if getElementType(hitElement) == "player" then triggerClientEvent(hitElement, "Event:Abrir_Painel_Police", hitElement) end end addEventHandler("onMarkerHit", marker, abrir_painel)
- 1 reply
-
- 1
-
-
Também fiz uma correção no do lord com o tempo duplicado function renderTime () local time = getRealTime() local hours = time.hour local minutes = time.minute local ampm = "" if (hours >= 12 and hours < 24) then hours = (time.hour - 12) ampm = " pm" elseif (hours >= 0 and hours < 12) then hours = hours ampm = " am" end if hours == 12 or hours == 0 then hours = 12 end if (minutes < 10) then minutes = "0"..time.minute end dxDrawText (""..hours..":"..minutes.." "..ampm.."",x*0,y*0,x*1366,y*768,tocolor(255, 255, 255, 255),x*1.2,"arial","center","center",false,false,false,false,false) end addEventHandler ("onClientRender", root, renderTime)
-
Manda o código pra fica mais fácil a visualização do erro e a correção, mas explique uma coisa, você quer do jeito do lord, apenas adiciona am e pm ? A alteração que eu fiz está funcionando, porem, fiz uma correção : function renderTime () local time = getRealTime() local hours = time.hour local minutes = time.minute if (hours < 10) then hours = "0"..hours end if (minutes < 10) then minutes = "0"..minutes end if hours >= 0 and hours < 12 then --/> Se as horas forem entre 0 a 11:59 então fazer : minutes = minutes.." am" --/> AM else --/> Caso não ser entre 0 a 11:59 então fazer : minutes = minutes.." pm" --/> PM end dxDrawText (""..hours..":"..minutes.."",x*0,y*0,x*1366,y*768,tocolor(255, 255, 255, 255), x*1.2,"arial","center","center",false,false,false,false,false) end addEventHandler ("onClientRender", root, renderTime)
-
local time = getRealTime() local hours = time.hour local minutes = time.minute if (hours < 10) then hours = "0"..hours end if (minutes < 10) then minutes = "0"..minutes end if hours >= 0 and hours <= 12 then --/> Se as horas forem entre 0 a 12 então fazer : minutes = minutes.." am" --/> AM else --/> Caso não ser entre 0 a 12 então fazer : minutes = minutes.." pm" --/> PM end
-
Queria colocar o chat T só para comandos
Angelo Pereira replied to Loudss's topic in Programação em Lua
Cuidado com o spam de tópicos do mesmo assunto. Crie um novo recurso chamado "cancelar_chat_t", e dentro : Crie o "meta.xml", e adicione dentro : <meta> <script src="anti_chat.Lua" type="server" /> </meta> Crie um arquivo chamado "anti_chat.Lua" e adicione dentro : addEventHandler("onPlayerChat", getRootElement(), function(_, msgtype) if (msgtype == 0) then cancelEvent(true) end end ) -
[Pedido] Script para uma unica Arma Principal
Angelo Pereira replied to Parthenon's topic in Programação em Lua
Ou, utilizar takeAllWeapons ( thePed ) [Removera todas armas do jogador], e logo em seguida, da outra arma ao jogador. -
[AJUDA] Ver se o jogador esta em um carro
Angelo Pereira replied to murilo2929's topic in Programação em Lua
getPedOccupiedVehicle ( ped thePed ) local veh = getPedOccupiedVehicle (thePed) --/> Verificar se o Player Esta em Veiculo. if veh then return end --/> Retorna. Exemplo : function teleporte ( source ) local veh = getPedOccupiedVehicle (source) if veh then ouputChatBox("Você So Pode usa Este Comando Fora do Veiculo", source,255,255,255,true) return end setElementPosition(source, 0,0,0) end addCommandHandler("tp", teleporte) -
Bom, talvez exista uma falha em algum script, que ela consiga fazer isto, agora como fazer isso, se o dono não sabe, quem dirá nós, porem, teoricamente, exista uma falha em algum script como eu havia dito, que ele saiba, pelo vídeo ele consegue até muda as rodas aleatoriamente. bom, eu diria ele esteja usando um comando e esteja usando bind (é o que eu acho).