Jump to content

Tremidinha

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by Tremidinha

  1. Hi, I've been banned from the community for many years now because I posted a feature that saved users' passwords as soon as they logged in. Today I would like to know if you can remove me so I can use my account. https://community.multitheftauto.com/index.php?p=profile&id=254298
  2. Cara tu quer fazendo um comando ou um evento?
  3. function removeHex(name) return type(name)=="string" and string.gsub(name, "#%x%x%x%x%x%x", "") or name; end function getPlayerByCurtName(playerName) for i,player in ipairs (getElementsByType("player")) do if string.find(string.lower(removeHex(getPlayerName(player))),string.lower(playerName)) then return player end end return false end Se não funcionar cola aqui em casa que nois conversa.
  4. StanleySathler Sei como funciona. No começo do curso você não usa uma máquina e sim papel lápis e borracha. Outra coisa, eu não estou nenhum pouco incomodado amigo, cada um ajuda como pode e você fez sua parte, apenas dei outra alternativa ao rapaz. Agora nego já chegou fazendo texto enorme pra apenas dizer que não se aprende com código pronto. Eu aprendi, depois de várias e várias edições fui aprendendo como fazer.https://community.multitheftauto.com/index.php?p=profile&id=254298
  5. Se eu fosse o Reggae estaria muito grato por toda a explicação do Stanley. Se ele prefere o código pronto e não quer aprender lendo tutoriais é problema dele. O post está lá, e será de grande proveito pra quem está interessado. É questão de interesse, de que adianta querer fazer um servidor com bases de códigos feitas por outro? Se for por preguiça, então o servidor será sempre fraco e a pessoa nunca vai aprender nada e sempre vai precisar de ajuda. Digo isto, porque já fui assim, daqueles que "não quer estudar mas quer aprender" (ou no caso: fazer um servidor). E quando aprendi Lua foi sem base sobre o funcionamento de tudo; isso porque havia aprendido quase tudo na prática, mas quando minha 'cabeça mudou' passei a aproveitar todo tutorial que lia aliado da prática que nunca deixei de lado. Sei que isso já é uma outra discussão e está fora do assunto do tópico. De qualquer forma, quis deixar minha opinião para aqueles que tem o conceito errado. Se aprende com exemplos. Ele poderia ler o tutorial, demorar 10 horas pra descobrir aonde ele errou, ou eu poderia concertar o que estava errado explicar aonde errou e porque errou, e qual a maneira correta de se fazer. E ele aprenderia mais rápido
  6. Amigo ao invés de se cansar lendo esse tutorial, e quebrar a cabeça pra tentar entender, chama mp que eu te ajudo, arrumamos seu código e digo aonde você errou. Obg.
  7. Cara apaga tudo isso e usa colshape, é mt mais fácil... ai ta um exemplo: https://wiki.multitheftauto.com/wiki/OnColShapeHit
  8. Vão plantar batata, mt chororô. Gostam de ficar se fazendo, ser algo que não são, escrevem um texto de 30 linhas pra dizer aborubrinhas.
  9. Concordo com você XeoN, sou inexperiente, por isso sou Organizador na Unit-Games GangWar e já CRIEI servidores que bombaram e foram top1 BR, quando comecei no MTA você nem sabia o que era. Experiente mesmo é tu que começou a fazer script ano passado e acha que é o pika das galáxias.
  10. Seu código está certo só faltou - end - um comando = {} pra cada comando - alterar source pra thePlayerSource no outputChatBox - alterar getPlayerSourceMoney para getPlayerMoney - commandoColete[thePlayerSource] = true setTimer( function(buyarmor) commandoColete[thePlayerSource] = false end, tempo, 1) Tem que ficar dentro do if não dentro do else commandoVida = { } tempo = 20000 function buyhealth (thePlayerSource) local money = getPlayerMoney ( thePlayerSource ) if money >= 250 then if (commandoVida[thePlayerSource]) then return outputChatBox ( "Aguarde 20 segundo para comprar Vida Novamente !!", thePlayerSource, 225, 0, 0 ) end outputChatBox ('#ffffff[#00FF00 Vida #ffffff] ' .. getPlayerName(thePlayerSource) .. '#ffffff Comprou Uma [#00FF00 /vida #ffffff] Por #00FF00R$: 2500', root, 255, 255, 255, true) local thePlayerhealth = getElementHealth ( thePlayerSource ) setElementHealth ( thePlayerSource, 569 ) takePlayerMoney ( thePlayerSource, 2500 ) commandoVida[thePlayerSource] = true setTimer( function(buyhealth) commandoVida[thePlayerSource] = false end, tempo, 1) else outputChatBox("A Vida Custa 2500$!",thePlayerSource, 255, 0, 0) end end addCommandHandler ( "vida", buyhealth ) commandoColete = { } tempo = 20000 function buyarmor (thePlayerSource) local money = getPlayerMoney ( thePlayerSource ) if money >= 500 then if (commandoColete[thePlayerSource]) then return outputChatBox ( "Aguarde 20 segundo para comprar Colete Novamente !!", thePlayerSource, 225, 0, 0 ) end outputChatBox ('#ffffff[#00FF00 Colete #ffffff] ' .. getPlayerName(thePlayerSource) .. '#ffffff Comprou Um [#00FF00 /colete #ffffff] Por #00FF00R$: 3500', root, 255, 255, 255, true) local thePlayerarmor = getPedArmor(thePlayerSource) setPedArmor ( thePlayerSource, 100 ) takePlayerMoney ( thePlayerSource, 3500 ) commandoColete[thePlayerSource] = true setTimer( function(buyarmor) commandoColete[thePlayerSource] = false end, tempo, 1) else outputChatBox("O Colete Custa 3500$!",thePlayerSource, 255, 0, 0) end end addCommandHandler ( "colete", buyarmor )
  11. Não ta folgando @_@ pra mim isso é coisa simples não demoro 5 minutos pra fazer, e eu gosto
  12. Ninguém me ensinou lua, eu aprendi sozinho vendo exemplos
  13. usar setTimer https://wiki.multitheftauto.com/wiki/SetTimer
  14. Realmente é difícil tirar o modem da tomada @_@ Sei la, testa ai.
  15. Não cara, ninguém te dar o código pronto aqui. já está querendo copiar servidores que tem isso é ? recomendo para você estudar mais sobre LUA Eu do @_@ ClientSide local screenWidth, screenHeight = guiGetScreenSize ( ) -- Get the screen resolution (width and height) text = "" function createText ( ) dxDrawText ( text, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) -- Draw zone name text. dxDrawText ( text, 44, screenHeight - 43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "pricedown" ) end function mostrarDx(texto) text = texto addEventHandler ( "onClientRender", root, createText ) -- keep the text visible with onClientRender. end addEvent("dxTextMostrar",true) addEventHandler("dxTextMostrar",getRootElement(),mostrarDx) function esconderDx() removeEventHandler ( "onClientRender", root, createText ) -- keep the text invisible with onClientRender. addEvent("dxTextEsconder",true) addEventHandler("dxTextEsconder",getRootElement(),mostrarDx) https://wiki.multitheftauto.com/wiki/DxDrawText ServerSide function adminmensagem(player,commandName, ...) imsg = table.concat({...}, " ") if ( hasObjectPermissionTo ( player, "command.mute", true ) ) then if imsg and imsg ~= "" then triggerClientEvent("dxTextMostrar",getRootElement(),getPlayerName(player)..": "..imsg) setTimer ( triggerClientEvent, 5000, 1, "dxTextEsconder",getRootElement() ) else outputChatBox("Digite uma mensagem!.",player) end end end addCommandHandler("anuncio", adminmensagem) https://wiki.multitheftauto.com/wiki/SetTimer https://wiki.multitheftauto.com/wiki/TriggerClientEvent
  16. Aqui está uma outra solução SeriasQueNaoPodemSerBanidos = { ["SEUSERIAL"] = true, ["SEUSERIAL"] = true, ["SEUSERIAL"] = true } function announceBan( theBan ) if getElementType( source ) then --Check if a player banned the IP/Serial if SeriasQueNaoPodemSerBanidos[getBanSerial(theBan)] then outputChatBox("[ERRO] Esse serial não pode ser banido.!") removeBan(theBan) end end end addEventHandler( "onBan", root, announceBan )
  17. Que retardado compra uma bosta dessa? ------ é simples fazer isso. obj = createObject ( 1337, 0, 0, 0, 0, 0, 0 ) function elevadorCmd(thePlayer,commandName,andar) if (andar == 0) then moveObject(obj,10000,0,0,0) elseif (andar == 1) then moveObject(obj,10000,0,0,10) elseif (andar == 2) then moveObject(obj,10000,0,0,20) elseif (andar == 3) then moveObject(obj,10000,0,0,30) elseif (andar == 4) then moveObject(obj,10000,0,0,40) elseif (andar == 5) then moveObject(obj,10000,0,0,50) elseif (andar == 6) then moveObject(obj,10000,0,0,60) -- ..... end end addCommandHandler("elevador",elevadorCmd)
  18. Mano eu troquei mas tipo se voce morre com outra skin voce nasce com ela queria que quando o player morresse nascesse com a skin do cj Cola o código aqui
  19. No Script play em setPedSkin() provavelmente ta math.random() troque por 0
  20. Melhor que isso? só o script pronto..
  21. Krai tu é vivo ainda? ----- playersnoevento = 0 maxplayersnoevento = 100 function entrarnovento(thePlayer) playernoevento = playersnoevento + 1 if not (getElementData(thePlayer,"noevento")) then -- vê se o cara já ta no evento setElementData(thePlayer,"noevento",true) setElementPosition(thePlayer,seuX,seuY,seuZ) outputChatBox("[EVENTO] "..getPlayerName(source).." entrou no evento ["..playersnoevento.."/"..maxplayersnoevento.."]") end end addCommandHandler("irevento",entrarnoevento) function sairdoevento() if (playersnoevento > 0) then -- vÊ se tem alguém no evento pra não ficar -1 if getElementData(source,"noevento") then -- vê se o cara ta no evento pra ele poder usar o comando playersnoevento = playersnoevento - 1 setElementData(source,"noevento",false) outputChatBox("[EVENTO] "..getPlayerName(source).." saiu do evento ["..playersnoevento.."/"..maxplayersnoevento.."]") end end end addCommandHandler("sairevento",sairdoevento) addEventHandler("onPlayerWasted",getRootElement(),sairdoevento)
  22. o god... function playerDamage_text ( attacker, weapon, bodypart, loss ) --when a player is damaged if ( bodypart == 9 and weapon == 34) then -- if the body part is 9, i.e. the head outputChatBox ( "Headshot!", getRootElement (), 255, 170, 0 ) --output "Headshot" into the chatbox killPed ( source, attacker, weapon, bodypart ) -- and kill the player end end addEventHandler ( "onPlayerDamage", getRootElement (), playerDamage_text ) https://wiki.multitheftauto.com/wiki/OnPlayerDamage
×
×
  • Create New...