Jump to content

Doongogar

Members
  • Posts

    343
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Doongogar

  1. esta dando este erro ERROR: marker/script.lua52: attempt to index global 'marker' (a nil value) oque faço para conzertar
  2. tentei editar um chat local retirando as tags que apareciam e agora fica dando o erro : ERROR: Loading script failed: [Chat]/Chatlocal.lua:46: ')' expected (to close '(' at line 19) near 'end' gostaria de resolver e preciso de ajuda aqui o script do chat local onde ta o erro: -------------------------------------------------------------------------------------------- DistanciaDoChatLocal = 200 -- Metros --MensagemFalandoRapidoDemaisLocal = '#ffffff[ #CE98EBAnti Flood #ffffff] - #ffffffVocê Esta Digitando Muito Rapido, Aguarde 2 Segundos' ComandoDoChatGlobal = "" -- Ex /g Mensagem ComandoDoChatGlobal2 = "" ValorDoChatGlobal = 0 -- Dinheiro --MensagemFalandoRapidoDemaisGlobal = '#ffffff[ #FF0000Anti Flood #ffffff] - #ffffffVocê Esta Digitando Muito Rapido, Aguarde 5 Segundos' MensagemVoceEstaMutadoGlobal2 = '#ffffff[ #FF0000Aviso #ffffff] - #FF0000Você Esta Mutado, e Não Podera Utilizar os Chat do Servidor' MensagemVoceEstaMutadoGlobal = '#ffffff[ #FF0000Aviso #ffffff] - #FF0000Você Esta Mutado, e Não Podera Utilizar os Chat do Servidor' -------------------------------------------------------------------------------------------- -- Config do Chat Local addEventHandler("onPlayerChat", root, function(tresc, msgtype) if (msgtype == 0) then cancelEvent() local x,y,z = getElementPosition(source) for key, gracze in ipairs(getElementsByType("player")) do local x2,y2,z2 = getElementPosition(gracze) -- if getElementData (source, "ChatLocal:Delay", true) then -- outputChatBox ( MensagemFalandoRapidoDemaisLocal, source, 255, 255, 255, true ) return end if ( getDistanceBetweenPoints3D ( x, y, z, x2, y2, z2 ) < DistanciaDoChatLocal ) then local int = getElementInterior ( source ) local dim = getElementDimension ( source ) local int2 = getElementInterior ( gracze ) local dim2 = getElementDimension ( gracze ) if ( int == int2 and dim == dim2 ) then conta = getAccountName ( getPlayerAccount ( source ) ) end end end end end -- setElementData (source, "ChatLocal:Delay",true) --setTimer (setElementData, 2000, 1, source, "ChatLocal:Delay", false) end) -------------------------------------------------------------------------------------------- -- Config do Chat Global function adminchat ( thePlayer, _, ... ) local message = table.concat ( { ... }, " " ) if ( isPlayerOnGroup ( thePlayer ) ) then for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( isPlayerOnGroup ( player ) ) then if ( isPlayerMuted(thePlayer) ) then outputChatBox ( MensagemVoceEstaMutadoGlobal, thePlayer, 255, 255, 255, true ) return end -- if getElementData (thePlayer, "ChatGlobal:Delay1", true) then -- outputChatBox ( MensagemFalandoRapidoDemaisGlobal, thePlayer, 255, 255, 255, true ) return end --local money = getPlayerMoney(thePlayer) --if (money < ValorDoChatGlobal ) then --outputChatBox ( MensagemDinheiroInsuficienteGlobal, thePlayer, 255, 255, 255, true ) return end conta = getAccountName(getPlayerAccount(thePlayer)) end end end end if not getElementData( thePlayer, "ChatGlobal:Avisado", true ) then --outputChatBox ( AvisoDoValorDaMensagemGlobal, thePlayer, 255, 255, 255, true ) end setElementData ( thePlayer, "ChatGlobal:Avisado", true ) --takePlayerMoney ( thePlayer, ValorDoChatGlobal ) -- setElementData ( thePlayer, "ChatGlobal:Delay1",true ) -- setTimer ( setElementData, 0, 1, thePlayer, "ChatGlobal:Delay1", false ) end addCommandHandler ( ComandoDoChatGlobal, adminchat ) function adminchat2 ( thePlayer, _, ... ) local message = table.concat ( { ... }, " " ) if ( isPlayerOnGroup ( thePlayer ) ) then for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( isPlayerOnGroup ( player ) ) then if ( isPlayerMuted(thePlayer) ) then outputChatBox ( MensagemVoceEstaMutadoGlobal2, thePlayer, 255, 255, 255, true ) return end -- if getElementData (thePlayer, "ChatGlobal:Delay1", true) then -- outputChatBox ( MensagemFalandoRapidoDemaisGlobal, thePlayer, 255, 255, 255, true ) return end --local money = getPlayerMoney(thePlayer) --if (money < ValorDoChatGlobal ) then --outputChatBox ( MensagemDinheiroInsuficienteGlobal, thePlayer, 255, 255, 255, true ) return end conta = getAccountName(getPlayerAccount(thePlayer)) end end end end if not getElementData( thePlayer, "ChatGlobal:Avisado", true ) then --outputChatBox ( AvisoDoValorDaMensagemGlobal, thePlayer, 255, 255, 255, true ) end setElementData ( thePlayer, "ChatGlobal:Avisado", true ) --takePlayerMoney ( thePlayer, ValorDoChatGlobal ) -- setElementData ( thePlayer, "ChatGlobal:Delay1",true ) -- setTimer ( setElementData, 0, 1, thePlayer, "ChatGlobal:Delay1", false ) end addCommandHandler ( ComandoDoChatGlobal2, adminchat2 ) -------------------------------------------------------------------------------------------- function isPlayerOnGroup ( thePlayer ) local account = getPlayerAccount ( thePlayer ) local inGroup = false for _, group in ipairs ( { "Everyone" } ) do if isObjectInACLGroup ( "user.".. getAccountName ( account ), aclGetGroup ( group ) ) then inGroup = true break end end return inGroup end --------------------------------------------------------------------------------------------
  3. ola, gostaria de saber como faz para criar Markers de spawn de carro, spawn de skin, spawn de colete e vida e etc, por comando, ex: /markercarro (id do carro)*criar marker de spawn de carro com o id do veiculo espeficicado nas minhas coordenadas, seria um script para facilitar e não precisar ficar pegando coordenadas e mudando diretamente em um script
  4. ola eu não sei programar portanto não me julguem porfavor, gostaria de saber como faço para criar um script que sete arma por id ex: /setarma (idPlayer) (weaponId) (munição) tentei fazer esse script esta ai abaixo minha tentativa, não funcionou, oque fiz de errado? function setArma ( thePlayer, cmd, id, weaponId ) if(id) then local playerID = tonumber(id) if(playerID) then local targetPlayer = getPlayerID(playerID) if targetPlayer then giveWeapon ( thePlayer, cmd, id, weaponId, 900, true ) end end end end addCommandHandler("setweapon", setArma)
  5. ERROR: Loading script failed: blitz\script.lua:50: '<name>' expected near '(' dando este erro no debug, não oque é, poderia ajudar?
  6. ola eu gostaria de saber como faço para excluir os objetos criados por esse script (não fui eu que fiz) gostaria de uma solução, que apagasse todos os objetos criados, indenpendente mente do id do objeto, e se estou longe ou perto do objeto function createObjectCommand(thePlayer, commandName) if (thePlayer) then local x, y, z = getElementPosition(thePlayer) local theObject = createObject(1238, x, y, z - 0.50, 0, 0, 0) if (theObject) then end end end addCommandHandler("cone", createObjectCommand)
  7. Eu gostaria de saber como faço para puxar todos os players do server pra eu fazer eventos mais facilmente
  8. como faz pra quando o staff ativar a proteção, apareça uma mensagem so para ele dizendo que ele ativou a proteção function togglestaffMode(thePlayer) if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup ("Staff")) then if getElementData(thePlayer,"invincible") then setElementData(thePlayer,"invincible",false) else setElementData(thePlayer,"invincible",true) end end end addCommandHandler("pro",togglestaffMode)
  9. ola gostaria de saber como se faz um script que spawnaria um ped na minha coordenada, apenas dando um comando com o id do ped ex: /createped (id)
  10. function setPlayerSkin2(thePlayer, commandName, skin) if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup ("Staff")) then if getElementModel(thePlayer) == skin then outputChatBox(error .. "O Jogador Ja Possui Esta Skin!", thePlayer, 255, 255, 255, true) return end setElementModel(thePlayer, skin) outputChatBox("A Skin Foi Alterada Com Exitô", thePlayer, 255, 255, 255, true) end end addCommandHandler("setskin", setPlayerSkin2, false, false) o script nao e meu!, apenas editei, nao consegui fazer por id, o script funciona assim /setskin (nome do player) (id da skin) espero que ajude mesmo nao sendo oque estava buscando
  11. ola, eu gostaria de saber se alguem tem um script que desse dinheiro a todos os jogadores por comando ex: /dinheiro (quantia), e um script de verificar dinheiro de um jogador em especifico ex: /verdinheiro (id), não estou pedindo para que ninguem Faça o script, estou apenas perguntando se alguem tem ai de gaveta
  12. ola sou novo no mta e gostaria que esse script fizesse com que eu ja spawnasse o carro, com o player que deu o comando dentro do carro, e se possivel, colocar pra spawnar carro em outras pessoas pelo id da pessoa, ex: /createvehicle (id da pessoa que quero que spawne o carro) (id do carro que vai spawnar) local distance = 5 --units -- define our handler (we'll take a variable number of parameters where the name goes, because there are vehicle names with more than one word) function consoleCreateVehicle ( sourcePlayer, commandName, ... ) -- if a player triggered it, not the admin, if ( sourcePlayer ) then -- calculate the position of the vehicle based on the player's position and rotation: local x, y, z = getElementPosition ( sourcePlayer ) -- get the player's position local rotZ = getElementRotation ( sourcePlayer ) -- get the player's rotation around the Z axis in degrees x = x + ( ( math.cos ( math.rad ( rotZ ) ) ) * distance ) -- calculate the X position of the vehicle y = y + ( ( math.sin ( math.rad ( rotZ ) ) ) * distance ) -- calculate the Y position of the vehicle -- get the complete vehicle name by joining all passed parameters using Lua function table.concat local vehicleName = table.concat({...}, " ") -- get the vehicle's model ID from the name local vehicleID = getVehicleModelFromName ( vehicleName ) -- if vehicle ID is valid, if vehicleID then -- create the vehicle using the information gathered above: local newVehicle = createVehicle ( vehicleID, x, y, z, 0, 0, rotZ ) -- if vehicle creation failed, give the player a message if not newVehicle then outputConsole ( "Failed to create vehicle.", sourcePlayer ) end end end end -- Attach the 'consoleCreateVehicle' function to the "createvehicle" command addCommandHandler ( "createvehicle", consoleCreateVehicle )
×
×
  • Create New...