Jump to content

Tommy.

Members
  • Posts

    226
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Tommy.

  1. No comando que liga/desliga o motor verifica a vida do veículo com getElementHealth
  2. Client-side function copy() setClipboard("https://www.inftplay.com") -- Merchandising FREE (= end addCommandHandler("link", copy)
  3. Mostre o seu código completo, pois o código do Lord não tem getPlayerName
  4. Tente isso: function comandoloja (source) if isElementWithinMarker (source, roubarloja ) then for _,players in pairs(getElementsByType("player")) do for i, k in pairs(corps) do local ContaACL = getAccountName ( getPlayerAccount ( players ) ) if isObjectInACLGroup ("user."..ContaACL, aclGetGroup (k)) then outputChatBox("#ffffff*#FF0000Atenção - O Jogador:#ffffff " .. getPlayerName(source) .. " #FF0000Está Roubando a Loja1.", players,255,255,255,true) end end end setPlayerWantedLevel ( source, 6 ) setElementPosition ( lojasair1, 834.66760, 7.45359, 1050) setElementPosition ( roubarloja, 822.74316, -0.47490, 1050) outputChatBox ('#ffffffAguarde Enquanto Você Pega O Dinheiro!',source,255,255,255,true) setPedAnimation(source, "SHOP", "ROB_Loop_Threat", 40000, true, false, false, false) setPedRotation(source,90 ) setPedAnimation( ped, "SHOP", "SHP_Rob_HandsUp") triggerClientEvent ( root, "roubar", root) setElementVisibleTo ( blipalarme, root, true ) setTimer ( function(source) setElementPosition ( lojasair1, 834.664418,7.3,1005.18701) setElementInterior ( roubarloja, 3) setPedAnimation(ped,false) setElementPosition ( ped, 819.40869, -0.45965, 1004.17969) givePlayerMoney ( source, 1300 ) outputChatBox ('#ffffffVocê Roubou a Loja 1 e Pegou #00ff00R$1.000',source,255,255,255,true) end, 40000, 1, source ) setTimer ( function() setElementVisibleTo ( blipalarme, root, false ) setElementPosition( roubarloja, 822.74316, -0.47490, 1003.2) end, 80000, 1 ) end end addCommandHandler ( "assaltar", comandoloja ) EDIT 1: Não testei!
  5. Na verdade da para alterar o shader de skins sem ser do CJ. Exemplo: client-side: addCommandHandler( "vestir", function( cmd ) local shader = dxCreateShader( "shader.fx", 0, 0, true, "ped" ) engineApplyShaderToWorldTexture( shader, "suit", localPlayer ) dxSetShaderValue( shader, "gTexture", texture ) outputChatBox( "Roupa vestida!" ) end ) shader.fx texture gTexture; technique TexReplace { pass P0 { Texture[0] = gTexture; } }
  6. Sempre que precisar de ajuda só aparecer que os "Los Simpsons" te ajuda, kk
  7. Aparentemente o seu código está tudo certo, da algum erro no /debugscript 3 ? Crie apenas um tópico com o mesmo assunto!
  8. Não esquece de alterar o nome da função no evento onClientRender para o nome da função da sua hud addEventHandler("onClientRender", root, Hud)
  9. Altere o getPlayerFromName pelo Useful Function getPlayerFromPartialName function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end Estranho, sabe me dizer se a variável colshape está retornando o ColShape ?
  10. Creio que isso aconteceu pq você tirou o código de cor do nickname quando adicionou na gridlist
  11. Caso de algum problema só relatar aqui no tópico.
  12. Qualidade e sincronia na dublagem
  13. Discordo, verifiquei o perfil dele antes de postar o código pronto e ele tem esses códigos desde 2017.
  14. ta um pouco "confuso" de entender esse código mas tentei fazer no olho: addEvent("KikaJorgadorBase",true) addEventHandler("KikaJorgadorBase",getRootElement(),function(playerName) local gPlayerKicked = getPlayerFromName(playerName) local ownerAccount = getAccountName(getPlayerAccount(source)) local baseName = getBaseNameFromOwnerAccount(ownerAccount) local colshape = getBaseColshape(baseName) local tpx,tpy,tpz = getElementData(colshape,"tpLoc1"),getElementData(colshape,"tpLoc2"),getElementData(colshape,"tpLoc3") if gPlayerKicked then if isElement(colshape) then if isElementWithinColShape(gPlayerKicked, colshape) then if gPlayerKicked == source then alert("Você não pode expulsar você mesmo.",source) return end if getPedOccupiedVehicle(gPlayerKicked) then removePedFromVehicle(gPlayerKicked) setVehicleEngineState(gPlayerKicked) setElementPosition(gPlayerKicked, tpx. tpy, tpz) else setElementPosition(gPlayerKicked, tpx, tpy, tpz) end alert("Você expusou o jogador "..getPlayerName(gPlayerKicked).."#ffffff da sua base.",source) end end end end) EDIT 1: Não testei EDIT 2: Não foi possível testar por falta de função: getBaseNameFromOwnerAccount() e getBaseColshape()
  15. Se eu entendi não séria mais fácil usar onColShapeHit ?
  16. Talvez isso funcione: addEventHandler ( "onChatMessage", root, function ( msg ) if ( tostring ( msg ) : lower ( ) == "login: you successfully logged in" ) then cancelEvent ( ) end end ) EDIT: Não testei!
  17. pensei a mesma coisa kkk, o cara começa a mentir já pulo para o próximo tópico
  18. Use o programa: SQLiteStudio Abra o 'SQLiteStudio' Importa o arquivo 'internal.db' (arquivo encontrado em: \server\mods\deathmatch\) Vai na tabela 'userdata' Clique no menu 'Data' Aperte 'Ctrl + A' Aperte em 'Delete' Aperte 'Ctrl + Enter'
  19. Tem sim, Tente usar: dxDrawLine3D onClientPlayerWeaponFire
  20. Tente isso: local screenW, screenH = guiGetScreenSize() local x, y = (screenW/1280), (screenH/720) function hud () dxDrawImage(x*918, y*0, x*362, y*58, ":br_hud/shruk.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("$", x*955, y*19, x*1089, y*68, tocolor(0, 177, 142, 255), 1.30, "default-bold", "left", "top", false, false, false, false, false) end addEventHandler("onClientRender", root, hud) EDIT 1: Verifique se na pasta br_hud tem o arquivo shruk.png EDIT 2: Não testei!
  21. só tirar: if getPlayerWantedLevel (source) < 6 then setPlayerWantedLevel(source, getPlayerWantedLevel(source) + 1) end Você criou o tópico na categoria errada! Vá para: Programação em Lua
  22. @WeeD1 Foi mal a demora, tinha esquecido, mas está ai: greenzones = { {x = 60, y = -1973, z = -20, width = 301, depth = 225, height = 500, r = 0 , g = 200 , b = 0 , a = 100}, -- Praia } dataVehicle = {} local AreaV = {} function IniciarAreaVerde() if greenzones and #greenzones ~= 0 then for _,v in ipairs (greenzones) do if v then if v.x and v.y and v.z and v.width and v.depth and v.height then local colShape = createColCuboid (v.x, v.y, v.z, v.width, v.depth, v.height) local rarea = createRadarArea (v.x, v.y, v.width, v.depth, v.r,v.g,v.b,v.a) setElementParent (rarea, colShape) colShape:setData("AreaProte", true) if colShape then AreaV[colShape] = true addEventHandler ("onElementDestroy", colShape, function() if AreaV[source] then AreaV[source] = nil end end ) addEventHandler ("onColShapeHit", colShape, function (h, d) if h and d and isElement(h) and getElementType (h) == "player" and getElementDimension( h ) == 0 and getElementInterior(h) == 0 then setElementData(h,"areaverde",true) end if h and d and isElement(h) and getElementType (h) == "vehicle" and getElementDimension( h ) == 0 and getElementInterior(h) == 0 then if isVehicleDamageProof(h) then dataVehicle[h] = true else setVehicleDamageProof(h, true) end end end ) addEventHandler ("onColShapeLeave", colShape, function (h, d) if h and d and isElement(h) and getElementType (h) == "player" and getElementDimension( h ) == 0 and getElementInterior(h) == 0 then setElementData(h,"areaverde",false) end if h and d and isElement(h) and getElementType (h) == "vehicle" and getElementDimension( h ) == 0 and getElementInterior(h) == 0 then if dataVehicle[h] then dataVehicle[h] = nil else setVehicleDamageProof(h, false) end end end ) end end end end end end addEventHandler ("onResourceStart",getResourceRootElement(getThisResource()), IniciarAreaVerde) EDIT 1: Não testei
  23. Quando eu chegar em casa dou uma olhada
  24. Solução rápida: Crie uma tabela Ao entrar na área verificar se o carro está blindado, adiciona argumento na tabela Ao sair verifica o argumento que está na tabela Execução: dataVehicle = {} -- A tabela citada. local hillArea = createColRectangle(-2171.0678710938, 678.17950439453, 15, 15) local hillRadar = createRadarArea(-2183.5678710938, 705.67950439453, 40, -40, 0, 255, 0, 175) function hill_Enter(thePlayer, matchingDimension) if (getElementType(thePlayer) == "player") then -- Verifica se o elemento que "entrou" é um player. local gVeh = getPedOccupiedVehicle(thePlayer) -- Pega o veículo que o player está. if gVeh then -- Verifica se o player está em um veículo. if isVehicleDamageProof(gVeh) then -- Verifica se o veículo já está blindado. dataVehicle[gVeh] = true -- Se o veículo já estiver blindado ele seta um argumento na tabela. else setVehicleDamageProof(gVeh, true) -- Se o veículo não estiver blindado ele blinda. end end end end addEventHandler("onColShapeHit", hillArea, hill_Enter) function hill_Exit(thePlayer, matchingDimension) if (getElementType(thePlayer) == "player") then -- Verifica se o elemento que "saiu" é um player. local gVeh = getPedOccupiedVehicle(thePlayer) -- Pega o veículo que o player está. if gVeh then -- Verifica se o player está em um veículo. if dataVehicle[gVeh] then -- Verifica se quando o veículo entrou na área já estava blindado. dataVehicle[gVeh] = nil -- Se já estava blindado ele deleta o argumento do veículo da tabela e não tira a blindagem. else setVehicleDamageProof(gVeh, false) -- Se quando entrou não estava blindado então ele tira a blindagem quando sai. end end end end addEventHandler("onColShapeLeave", hillArea, hill_Exit) EDIT: Não testei. @Lord Henry @DNL291 se eu falei besteira ou fiz algo viajado me corrigem pf
×
×
  • Create New...