Jump to content

Big Smoker

Members
  • Posts

    318
  • Joined

  • Last visited

Everything posted by Big Smoker

  1. Eu tinha conseguido, fui atras do forum como funcionava essa função, e foi igual o que vc sitou a cima OBRIGADO
  2. podem me ajuda? preciso identificar o tiro na cabeça do jogador fiz certo ela? mas nao da certo function tiro(wap,mag,ClipM,hitX, hitY, hitZ,element,startX, startY, startZ) local x,y,z,xx,xy,xz,_,_,torso = processLineOfSight(startX, startY, startZ, hitX, hitY, hitZ,false,false,true) if torso == 9 then -- COM HS else -- SEM HS end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), tiro)
  3. eu preciso usar o addEventHandler("onClientPlayerWeaponFire" nao o "onClientPlayerDamage"
  4. function tiro(wap,mag,ClipM,hitX, hitY, hitZ,element,startX, startY, startZ) if element then if getType(element) == "player" then local x,y,z,xx,xy,xz,_,_,torso = processLineOfSight(hitX, hitY, hitZ,startX, startY, startZ,false,false,true) if torso == 9 then outputChatBox("OK!!!!") else outputChatBox("NAO OK!!!!") end end end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), tiro)
  5. @DNL291 COMO QUE EU FAÇO PRA COLOCAR NESSA FUNÇÃO AQUI function tiro(wap,mag,ClipM,x,y,z,element) if getType(element) == "player" then dano, weapon = weaponDamage() triggerServerEvent("sincroniaSv", getLocalPlayer(), element, dano, weapon) end end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), tiro) queria colocar ai pra identificar a onde foi pego, se foi no Torso ou Head @DNL291 COMO QUE EU FAÇO PRA COLOCAR NESSA FUNÇÃO AQUI function tiro(wap,mag,ClipM,x,y,z,element) if getType(element) == "player" then dano, weapon = weaponDamage() triggerServerEvent("sincroniaSv", getLocalPlayer(), element, dano, weapon) end end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), tiro) queria colocar ai pra identificar a onde foi pego, se foi no Torso ou Head local x,y,z,xx,xy,xz,_,_,torso = processLineOfSight(startX, startY, startZ, hitX, hitY, hitZ,false,false,true)
  6. é que tava usando ele na função
  7. headshot EU FIZ UM SISTEMA A ONDE NAO USA O onClientPlayerDamage E SIM O onClientPlayerWeaponFire E PRECISAVA USAR UMA OPÇÃO QUE IDENTIFICA A CABEÇA DO PLAYER PARA EXECUTAR O headshot
  8. PESSOAL QUERIA SABER COMO EU COMO COLOCAR UM HEATSHOT NO onClientPlayerWeaponFire
  9. Boa Tarde, Pessoal queria saber se tem como eu modificar o HP do rino para perder dano e desativar a opção de explodir o carro quando encosta nele
  10. Bom dia Pessoal nao consegui resolver o seguinte erro: #1011 External HTTP file mismatch (Retrying this file with internal HTTP) [admin\client\admin_gui.Lua] ja procurei de tudo e ainda continua o erro o que pode ser isso
  11. Boa Tarde, Precisava saber como que eu faço para criar uma função a onde o jogador coloca o nome do Item ou nome do jogador que aparace na grilist, tipo ele digita as inicias do nome do Item / Nome do jogador e ja procura apenas aquele Item, ele colocando guiCreateEdit
  12. então eu tentei fazer isso que nao consigo, queria fazer uma função que assim que o player volta-se a conexão normal do packet loos ele seria kikado mais nao consigo
  13. Boa Tarde, eu fiz um sistema de packet Loos e coloquei com timer no clado CLIENT, funcionou normal so que ai da network no servidor e quando volta ele nao manda o kik para o lado SERVER. Existe alguma função que derrube o jogador sem kikar ele? Um exemplo dar perda de pacote e ele ser expulso com aquela mensagem (tempo do servidor foi interrompida) OBRIGADO
  14. eu quero fazer por dataBase pq quando resetar a internal nao preciso fica fazendo backup dela
  15. Boa Tarde, preciso de ajuda num script que salva kill e HS total so que nao ta salavando, quando player desloga do servidor zera tudo, salva a conta por serial ----- Login Playerd2 = db_query( "SELECT * FROM players WHERE account=? LIMIT 1", getPlayerSerial(player)) if Playerd2 and #Playerd2 > 0 then setPlayerMoney(player, Playerd2[1]["mwcTotal"] or 0) setElementData( player, "zombieskilled_total", Playerd2[1]["ZombiesTotal"]) setElementData( player, "murders_total", Playerd2[1]["MurdesTotal"]) setElementData( player, "alivetime_total", Playerd2[1]["AliveTime"]) setElementData( player, "headshotsz_total", Playerd2[1]["hsTotal"] ) setElementData( player, "headshotsp_total", Playerd2[1]["HsSPTotal"]) setElementData( player, "banditskilled_total", Playerd2[1]["BanditTotal"]) end setElementData(player, "logedin", true) --- Salvamento por serial addEventHandler("onElementDataChange",getRootElement(),function() if getElementType(source) == "player" then if getElementData ( source, "logedin" ) then local mwcTotal = getPlayerMoney(source) local zombiet = getElementData( source, "zombieskilled_total" ) local murdest = getElementData( source, "murders_total" ) local alivet = getElementData( source, "alivetime_total" ) local heatt = getElementData( source, "headshotsz_total" ) local heatst = getElementData( source, "headshotsp_total" ) local banditt = getElementData( source, "banditskilled_total" ) local d = db_query( "SELECT * FROM players WHERE account=? LIMIT 1", getPlayerSerial(source) ) -- if d and zombiet and murdest and alivet and heatt and heatst and banditt then -- if d and #d > 0 then -- dbExec( dbLevel, "DELETE FROM players WHERE account=?", getPlayerSerial(source)) -- end if not SQLite_Check(getPlayerSerial(source)) == true then outputChatBox("#FF0000[MW DAYZ ] - #ffffffPress #ff0000'enter' #ffffffto set up a Tent.",getRootElement(),255,255,255,true) dbExec(dbLevel, "INSERT INTO players (account, mwcTotal, ZombiesTotal, MurdesTotal, AliveTime, hsTotal, HsSPTotal, BanditTotal) VALUES(?,?,?,?,?,?,?,?)",getPlayerSerial(source), mwcTotal or 0, zombiet or 0,murdest or 0,alivet or 0,heatt or 0, heatst or 0, banditt or 0) else dbExec(dbLevel, "UPDATE players SET mwcTotal=?, ZombiesTotal=?, MurdesTotal=?, AliveTime=?, hsTotal=?, HsSPTotal=?, BanditTotal=? WHERE account=?",mwcTotal ,zombiet, murdest,alivet,heatt,heatst,heatst,banditt, getPlayerSerial(source)) end -- end end end end)
  16. ´Boa Tarde, precisava de ajuda para remover esses aviso que fica dando no console AVISO 1 - : Bad argument @ 'setElementData' [Expected element at argument 1] AVISO 2 - Bad argument @ 'giveWeapon' [Expected element at argument 1] function spawnBot(x, y, z, rot, skin, interior, dimension, team, weapon, mode, modesubject) --checks the function commands to see if all neccesary parts are filled, sets defaults if not or returns false. if not x then return false end if not y then return false end if not z then return false end if not rot then return false end if not skin then skin = 0 end if not interior then interior = 0 end if not dimension then dimension = 0 end if isElement(team) == false then team = nil end if not weapon then weapon = 0 end if not mode then mode = "hunting" end if not modesubject then modesubject = nil end if mode == "following" then if not modesubject then return false end end if mode == "chasing" then if not modesubject then return false end end local slothbot = createPed (tonumber(skin),tonumber(x),tonumber(y),tonumber(z))--spawns the ped if (slothbot ~= false) then triggerEvent ( "onBotSpawned", slothbot ) 3 --------------------------------------------------------------------------------------------------------------------------------- -- Aviso (AVISO 1) aqui!!!!! setTimer ( setElementData, 200, 1, slothbot, "slothbot", true ) -- makes it a bot setTimer ( setElementData, 200, 1, slothbot, "AllowFire", true ) -- makes it able to shoot when it wants setTimer ( giveWeapon, 800, 1, slothbot, tonumber(weapon), 99999, true ) --gives the weapon! -------------------------------------------------------------------------------------------------------------------------------- setElementData(slothbot, "BotWeapon", tonumber(weapon)) if team ~= nil then setElementData(slothbot, "BotTeam", team) end setTimer ( setElementInterior, 100, 1, slothbot, tonumber(interior)) --sets interior setTimer ( setElementDimension, 100, 1, slothbot, tonumber(dimension)) --sets dimension --sets the mode if mode == "waiting" then setTimer ( setElementData, 600, 1, slothbot, "status", "waiting") elseif mode == "following" then setTimer ( setElementData, 400, 1, slothbot, "leader", modesubject ) setTimer ( setElementData, 600, 1, slothbot, "status", "following") elseif mode == "chasing" then setTimer ( setElementData, 400, 1, slothbot, "target", modesubject ) setTimer ( setElementData, 600, 1, slothbot, "status", "chasing") elseif mode == "guarding" then setTimer ( setBotGuard, 400, 1, slothbot, x, y, z) ------------------------------------------------------------------------------------------------------------------------------------------ -- (AVISO 2) AQUI!!!!! else setTimer ( setElementData, 600, 1, slothbot, "status", "hunting") --------------------------------------------------------------------------------------------------------------------------------------------- end return slothbot end end
  17. Boa Tarde, Gostaria de saber qual função devo usar para querer colocar uma mensagem no chat exemplo: Jogado X saiu do Servidor (Ping Alto) usando essa função aqui "Kicked" addEventHandler('onPlayerQuit', g_Root, function(reason) if (reason == "Quit") then outputChatBox('['..getPlayerCount()..'#FFFFFF / #7EC0EE'..getMaxPlayers()..'] '..getPlayerName(source)..' #FFFFFFSaiu do Servidor! Motivo [#FF0000Saiu#FFFFFF]', getRootElement(), 126, 192, 238, true) elseif (reason == "Timed out") then outputChatBox('['..getPlayerCount()..'#FFFFFF / #7EC0EE'..getMaxPlayers()..'] '..getPlayerName(source)..' #FFFFFFSaiu do Servidor! Motivo [#FF0000Net caiu#FFFFFF]', getRootElement(), 126, 192, 238, true) elseif (reason == "Banned") then outputChatBox('['..getPlayerCount()..'#FFFFFF / #7EC0EE'..getMaxPlayers()..'] '..getPlayerName(source)..' #FFFFFFSaiu do Servidor! Motivo [#FF0000Banido#FFFFFF]', getRootElement(), 126, 192, 238, true) elseif (reason == "Kicked") then outputChatBox('['..getPlayerCount()..'#FFFFFF / #7EC0EE'..getMaxPlayers()..'] '..getPlayerName(source)..' #FFFFFFSaiu do Servidor! Motivo [#FF0000Chutado#FFFFFF]', getRootElement(), 126, 192, 238, true) end end )
  18. Boa Tarde, Tenho um sistema no meu servidor que funciona so que ai coloquei em outro servidor e ele naoe sta funcionando tem alguma função que desabilita isso? pois ele funciona em um servidor mais no outro nao. Segue abaixo o sistema Client Obrigado local textFont = "default-bold" -- The font of the tag text local textScale = 1 -- The scale of the tag text local heightPadding = 1 -- The amount of pixels the tag should be extended on either side of the vertical axis local widthPadding = 1 -- The amount of pixels the tag should be extended on either side of the horizontal axis local xOffset = 8 -- Distance between the player blip and the tag local minAlpha = 10 -- If blip alpha falls below this, the tag won't the shown local textAlpha = 255 local rectangleColor = tocolor(0,0,0,230) local w,h = guiGetScreenSize() addEventHandler("onClientRender",getRootElement(),function() if isPlayerMapVisible() then local sx,sy,ex,ey = getPlayerMapBoundingBox() local mw,mh = ex-sx,sy-ey local cx,cy = (sx+ex)/2,(sy+ey)/2 local ppuX,ppuY = mw/6000,mh/6000 local fontHeight = dxGetFontHeight(textScale,textFont) local yOffset = fontHeight/2 for k,v in pairs(getElementsByType("blip")) do local attached=getElementAttachedTo(v) if isElement(attached) and getElementType(attached)=="player" and attached ~= getLocalPlayer() then local px,py = getElementPosition(attached) local x = math.floor(cx+px*ppuX+xOffset) local y = math.floor(cy+py*ppuY-yOffset) local pname = getPlayerName(attached):gsub('#%x%x%x%x%x%x',''):gsub('#%x%x%x%x%x%x','') local nameLength = dxGetTextWidth(pname,textScale,textFont) local _,_,_,a = getBlipColor(v) -- if getElementData(attached,"Dominando") then return end if a > minAlpha then dxDrawRectangle(x-widthPadding,y+heightPadding,nameLength+widthPadding*2,fontHeight-heightPadding*2,rectangleColor,false) dxDrawText(pname,x,y,x+nameLength,y+fontHeight,tocolor(255,255,255,textAlpha),textScale,textFont,"left","top",false,false,false) end end end end end)
  19. Boa Tarde, Como eu faço para salvar o setElement Data quando soltaR O CLICK DA BARRA do onClientGUIScroll quero salvbar o setelementData di Sound LoginPlayer addEventHandler("onClientGUIScroll",getRootElement(),function (Scrolled) if source == MusicStart then volumeStart2 = guiScrollBarGetScrollPosition (source) / 100 setElementData(getLocalPlayer(),"soundLoginPlayer",volumeStart2) setElementData(getLocalPlayer(),"dxsoundLoginPlayer",volumeStart2*100) -- manda para o data base guiSetText(textStart,math.floor(getElementData(getLocalPlayer(),"dxsoundLoginPlayer")).." %") end end)
  20. Bom dia, Pessoal fiz um painel de informações e com um guiCreateScrollBar para volume so que esta dando quedas de FPS (depois de uns 10 minutos). textStart = guiCreateLabel (100, 241.5, 30, 22,(getElementData(getLocalPlayer(),"dxsoundLoginPlayer")or volumeStart*100).."%",false,tabConfig) guiSetFont (textStart, "default-small") MusicStart = guiCreateScrollBar(10, 240, 200, 18, true, false, tabConfig) guiScrollBarSetScrollPosition (MusicStart, getElementData(getLocalPlayer(),"dxsoundLoginPlayer")or volumeStart*100) addEventHandler("onClientGUIScroll",getRootElement(),function (Scrolled) if source == MusicStart then volumeStart2 = guiScrollBarGetScrollPosition (source) / 100 setElementData(getLocalPlayer(),"soundLoginPlayer",volumeStart2) setElementData(getLocalPlayer(),"dxsoundLoginPlayer",volumeStart2*100) -- manda para o data base guiSetText(textStart,math.floor(getElementData(getLocalPlayer(),"dxsoundLoginPlayer")).." %") end end) ----- Uso nas funções que tem playSound LoginMusic = playSound("sounds/Musics/1.mp3", true) setSoundVolume (LoginMusic, getElementData(localPlayer,"soundLoginPlayer") or 1)
  21. como eu faço isso? sou meio ruim de matemática mais quero fazer isso
  22. Boa Tarde , precisava de uma ajuda no meu gui to fazendo um guiCreateScrollBar para colocar a renderização do mapa e queria colocar para aparecer o guisetText seguir de acordo so que nao vai ele fica nisso queria que o guisetText coloca-se como queria que quando puxa a barra fica no minimo 200 ai vai subindo de 100 a 100 ate chegar 700. so que nao to conseguindo no chat 350 350 350 700 690 660 640 620 addEventHandler("onClientGUIScroll",getRootElement(),function (Scrolled) if source == Distance then textdistances = guiScrollBarGetScrollPosition (source) / 100*1000 -- setFarClipDistance( textdistances*1000 ) if textdistances < 200 or textdistances > 700 then textdistances2 = 200 else textdistances2 = textdistances end -- setFarClipDistance(1000) outputChatBox(textdistances2) guiSetText(textDistance,textdistances2.."%") end end)
  23. Minha duvida é. Eu devo deletar os arquivos da maquina? e deixar so o http? ou o que pois nunca mexi com ele
  24. Sim, eu fiz no client vou testar se ainda ta aparecendo. mais enfim la no ceu tb achei so que queria usar uma area do mapa mesmo
  25. Boa Noite, Queria saber como faz para fazer um download http para melhorar a velocidade de download do servidor. Se tiver algum tutorial. Estava vendo aqui e fiquei curioso iria me ajudar muito isso. Obrigado
×
×
  • Create New...