-
Posts
58 -
Joined
-
Last visited
Everything posted by R1S1NG
-
Oi novamente kkk, estou estudando sobre programação em lua no mta e estou tentando fazer um script que quando a pessoa toca no maker "arrow" ela somente entre, se certas skins estão no script, eu fiz isso: local markerLoja = createMarker(500.03537, -1359.38660, 16.26155,"cylinder",2,0,191,255,155) --dentro da loja local blip = createBlip(500.03537, -1359.38660, 16.26155,45) setElementInterior(markerLoja,3) local markerEntrar = createMarker(499.61746, -1360.47314, 16.90461,"arrow",1,0,191,255,155) -- fora da loja local markerSair = createMarker(207.02251, -140.28961, 1004.10781,"arrow",1,0,191,255,155) -- dentro da loja setElementInterior(markerSair,3) function entrar (source) if not getElementModel(source,54, 124) then else setElementPosition(source, 207.3560,-138.0029,1003.3130) setElementInterior(source, 3) end end addEventHandler("onMarkerHit",markerEntrar,entrar) function sair (source) setElementPosition(source, 499.61746, -1360.47314, 16.90461) setElementInterior(source, 0) end addEventHandler("onMarkerHit",markerSair,sair) (Não sei se posso por várias skins ao lado de source ;-; pode?) Eu sei que meu erro está entre este if not, queria entender isso e ver a correção sla. Obrigado sempre as pessoas que me ajudam, espero um dia saber programar para MTA e ajudar as pessoas de coração :3.
-
Fps de MTA travado em 6 / 25
R1S1NG replied to R1S1NG's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
Panda, mas não é ele, já utilizava em meu notebook ele com MTA. Na pasta do gta fica se criando pastas de cache da GPU e etc, mas creio que não seja isso, pois as removi e não afetam nada... -
Fps de MTA travado em 6 / 25
R1S1NG replied to R1S1NG's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
O erro voltou, i5 7400, 8gb de ram (Windows 10 pro 64 bits), 3 vez q ocorre -.- e eu nem modifiquei o gta (reparei q o gta offline fica sem som quando vai ficar travando, o menu de inicio onde muda as configurações, carrega save e etc...) e drivers atualizados e sistema também. -
Obrigado a todos, reparei nos erros estou aprendendo a programar em TI programação C, algo bem similar. Obrigado de coração!
-
Olá novamente, e desculpa ser chato kkk mas tenho um script que coloca id no chat e algumas coisas a mais, mas o MTA me exibe o seguinte erro: SCRIPT ERROR: localização do script X\server.lua:342: 'end' expected (to close 'function' at line 222) near 'else' ERROR: localização do script X\server.lua:313: attempt to concatenate a boolean value --[[ ########################################################################## ## ## ## ## ## Criador: Volklack ## ## ## ## ## ########################################################################## [C] Copyright 2012-2016, Apollo ]] local idname = get ( "idDataCaption" ) or "id" g_Players = {} function table.find(t, ...) if type(t) ~= 'table' then return false end local args = { ... } if #args == 0 then for k,v in pairs(t) do if v then return k, v end end return false end local value = table.remove(args) if value == '[nil]' then value = nil end for k,v in pairs(t) do for i,index in ipairs(args) do if type(index) == 'function' then v = index(v) else if index == '[last]' then index = #v end v = v[index] end end if v == value then return k, t[k] end end return false end function addElem(list, elem) local id local globList local newtable = { elem = elem } if not id then id = 1 while list[id] do id = id + 1 end end list[id] = newtable setElemID(elem, id) return id, newtable end function removeElem(list, elem) local id = table.find(list, 'elem', elem) if id then list[id] = nil setElemID(elem, nil) return id end end function getPlayerFromID(id) return g_Players[id] and isElement(g_Players[id].elem) and g_Players[id].elem end function getPlayerID(player) return getElemID(player) end function getElemID(elem) return elem and isElement(elem) and getElementData(elem, idname) end function setElemID(elem, id) if elem and isElement(elem) then setElementData(elem, idname, id) end end function onResourceStart () call ( getResourceFromName ( "scoreboard" ), "addScoreboardColumn", idname, root, 1, 0.05 ) for k, v in ipairs(getElementsByType("player")) do addElem(g_Players, v) end end addEventHandler ( "onResourceStart", resourceRoot, onResourceStart ) function onPlayerJoin() addElem(g_Players, source) setElementData (source, "mpb", true) end addEventHandler ( "onPlayerJoin", root, onPlayerJoin ) function onPlayerQuit (reason) local playerID = getElemID(source) g_Players[playerID] = nil end addEventHandler('onPlayerQuit', root, onPlayerQuit) function pmCommand(player, command, id, ...) if(id) then local playerID = tonumber(id) if(playerID) then local sdx = getPlayerFromID(playerID) if getElementData(sdx, "AnonAdmin") == true then if playerID > 2 then playerID = playerID -1 else playerID = playerID + 1 end end local target = getPlayerFromID(playerID) if(target) then local args = { ... } local msg = "" for k,v in pairs(args) do msg = msg .. ' ' .. v end for a, b in ipairs(getElementsByType("player")) do local bcc = getAccountName(getPlayerAccount(b)) if isObjectInACLGroup("user."..bcc, aclGetGroup("Console")) then outputChatBox("#FF0000Chat: #FFFFFF "..getPlayerName(player).."#FFFFFF("..(getPlayerID(player) or "???")..")#FF8000 é um #FF0000viadão#FF8000.", b, 255, 255, 255, true) end end outputChatBox("bad character", player, 255, 0, 0, true) return 1 end if(msg ~= "") then local mpb = getElementData (target, "mpb" ) if mpb == false then outputChatBox ( "#FF8000Mensagen privada:#ffffff Não foi enviada, pois o destinatário está com as mensagens privadas bloqueadas.",player, 255, 165, 0, true) else outputChatBox ( "#FF8000Mensagen privada:#FFFFFF #00FF00enviada para #FF8000" .. getPlayerName(target) .. " #FF8000(" .. id .. "): #FFFFFF"..msg.."", player, 255, 165, 0, true) if getElementData(player, "AnonAdmin") == true then outputChatBox ( "#FF8000Mensagen anônima: #FFFFFF"..msg.."", target, 255, 165, 0, true) else local mpb = getElementData (target, "mpb" ) if mpb == false then else outputChatBox ( "#FF8000Mensagen privada:#FFFFFF #FF0000recebida de #FF8000"..getPlayerName(player).." #FF8000(" .. (getPlayerID(player) or "???") .. "):#FFFFFF "..msg.."", target, 255, 165, 0, true) end end if getElementData(player, "AnonAdmin") == true then outputChatBox("#FFFFFFVocê recebeu uma mensagen anônima.", target, 255, 165, 0, true) else local mpb = getElementData (target, "mpb" ) if mpb == false then else outputChatBox("#FFFFFFVocê recebeu uma #FF8000Mensagen privada#FFFFFF!, para responder use #FF8000/pm ".. (getPlayerID(player) or "???").." (menssagem)", target, 255, 165, 0, true) end end for a, b in ipairs(getElementsByType("player")) do local bcc = getAccountName(getPlayerAccount(b)) if target ~= b and player ~= b and isObjectInACLGroup("user."..bcc, aclGetGroup("Console")) then outputChatBox("#FF8000Stalkeador: #FFFFFF"..getPlayerName(player).."#FFFFFF("..(getPlayerID(player) or "???")..")#FF0000 para#FFFFFF ".. getPlayerName(target).."#FFFFFF("..id.."): #FF0000 "..msg.."", b, 255, 255, 255, true) end end end else outputChatBox ( "[ERRO] menssagen em branco.", player, 200, 0, 0) end else outputChatBox ( "[ERRO] Jogador(a) (" .. id .. ") não foi encontrado.", player, 200, 0, 0) end else outputChatBox ( "[ERRO] ID (" .. id .. ") invalida.", player, 200, 0, 0) end else outputChatBox ( "#FF0000Chat:#FFFFFF Use /pm (id) (msg) para mandar mensagens privadas.", player, 255, 255, 255, true) outputChatBox ( "Não abuse das mensagens privadas.", player, 255, 255, 255, true) end end addCommandHandler("pm", pmCommand) function cleanchat(player) local accountname = getAccountName(getPlayerAccount(player)) if ( hasObjectPermissionTo ( player, "command.mute", true ) ) then outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox(" ") outputChatBox( "".. getPlayerName(player) .. " #fffffflimpou o chat.", root, 0, 255, 255, true) end end addCommandHandler("lc", cleanchat)
-
i have this in the acl.xml in admin, don't work OOH OK i have this <right name="resource.LP" access="true"></right> <right name="resource.ingressar" access="true"></right> thanks i test now your code don't work
-
Update: Nothing work, anyone script don't have acl permission (nothing :C) and i put the permission, reinstalled mta and nothing work. Console say this: Acess denied @ "aclGroupAddObject' for the police, Login panel says something similar!
-
I'm making a new RPG look so much life, but, anyone login panel don't have permission in acl admin, but i'm make the permission resource.login and mta say in console of server some error with the script don't have permission and i have another script of police and if i'm enter in the police clicking in the NPC, show a chatbox saying "You are police now" but, don't put the login in the group of police in painel P. It's a problem of painel P don't work nothing? I reinstalled mta but don't work. Sorry my bad english and thanks for all helping me and making me happy :D.
-
Fps de MTA travado em 6 / 25
R1S1NG replied to R1S1NG's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
Incrível, magicamente o gta estava bugado, tenho 8gb de ram e i5 7400, mas era o gta, reinstalei ele e magicamente voltou, sem sentido, mas resolvido! -
Fps de MTA travado em 6 / 25
R1S1NG replied to R1S1NG's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
Notei que é o gta, mas não sei como resolver, pois o gta também fica assim, seria alguma incompatibilidade com Windows 10 ou GTX 1050ti? -
Te agradeço muito ^^
-
Ok obrigado. Já mando e tem um .col junto.
-
então são dff, só que foram feitos para por no gta3.img, como se fosse substituir tipo por um mapa no gta, só que fui converter a MTA os dff e txd do mod. São algumas casas br, texturas de postes e lixeiras br, eu sei q funciona pq um cara também converteu, mas compilou o mapa dele convertido para mta em luac.
-
Tenho, eles carrrgam, só a textura não, eles eram do gta sa, e eu quis colocar no mta, eles usam no mod original o carrrgamento via gta3.img, então entende-se que deveria carrrgar no MTA. Alguns arquivos carrega textura, alguns não, são mais arquivos além destes do script, e não consigo por o colision deles, então ficam atravesseis...
-
Ok eu removo o zero, e como diferencio as duas? Observe: 1687 gen_roofbit1 genroofbits 1688 gen_roofbit2 genroofbits 1689 gen_roofbit3 genroofbits 1690 gen_roofbit4 genroofbits 1691 gen_roofbit5 genroofbits tirei o zero de todos e não carregou + nada :v odeio ser leigo com mapas..
-
A textura foi repetida pois para o objeto na ide da wiki eu achei idêntico a textura em relação aos objetos e eu removo aquele 0?
-
Olá a todos do fórum do mta, eu tenho um pequeno problema irritante... Eu baixei um mod de gta sa, um mapa, então eu fiz um script, coloquei dff e txd etc, meta... porém, ele não carrega a textura direito! Eu achei no ide list da wiki do mta a textura de qual dff seria, fiz certo mas fica branco, segue um pedaço do código: dff = engineLoadDFF ( "skins/gen_roofbit4.dff", 0 ) --Coloque o nome do DFF e não mexa nesse 0 engineReplaceModel ( dff, 1690 ) --Coloque o ID do objeto que você quer modificar engineSetModelLODDistance(1690, 9000) --ID do objeto e a distância que ele irá carregar - distancia está como 500 dff = engineLoadDFF ( "skins/gen_roofbit5.dff", 0 ) --Coloque o nome do DFF e não mexa nesse 0 engineReplaceModel ( dff, 1691 ) --Coloque o ID do objeto que você quer modificar engineSetModelLODDistance(1691, 9000) --ID do objeto e a distância que ele irá carregar - distancia está como 500 txd = engineLoadTXD ( "skins/genroofbits.txd" ) --Coloque o nome do TXD engineImportTXD ( txd, 1690 ) --Coloque o ID do objeto que você quer modificar txd = engineLoadTXD ( "skins/genroofbits.txd" ) --Coloque o nome do TXD engineImportTXD ( txd, 1691 ) --Coloque o ID do objeto que você quer modificar Este é um exemplo, na wiki o txd é usado em dois objetos, porém os dois ficam brancos, isso também ocorre com outros objetos em que o txd utilize apenas um dff... Obrigado a quem conseguir me ajudar! Se alguém souber uma maneira de sempre achar o txd correto do dff, obrigado também!
-
Eu estou fazendo um mapa, porém, eu queria que qualquer objeto que eu adicionasse fosse na dimensão 1, o problema é que se eu clicar em 2x encima e colocar dimensão 1, na verdade não altera a dimensão, e se eu iniciar o teste completo de mapa e setar dimensão 1 ele não aparece, apenas na dimensão padrão.
-
Olhem este meta e este lua: META: <meta> <info author="^Marry" version="1.0" type="script" /> <script src="animation.lua" type="client" /> <file src="bikev.ifp" /> </meta> LUA: function setanimation() if engineLoadIFP("bikev.ifp") then setPedAnimation(getLocalPlayer(), "ANIMATIONBLOCK", "animation1") end end addCommandHandler("animation", setanimation) Este bikev.ifp é um ifp para um skate flutuante, o problema é que o MTA lê normal, porém, ele não ativa, mesmo que carrega o script, algo de errado? (retirei dos tutoriais do mta na wiki)
-
Como controla um jogador de um servidor?
R1S1NG replied to R1S1NG's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
Muito obrigado DNL291, era isso que procurava mas não lembrava como achar!
