LT_WOLF
Members-
Posts
8 -
Joined
-
Last visited
LT_WOLF's Achievements
Newbie (4/54)
0
Reputation
-
Eu queria saber se tem como tirar as explosoes do veiculo e colocar uma mensagem (Veiculo Quebrado chame um Mecanico), podem me ajudar?
-
consegui, obrigado pela ajuda.. Aproveitando a oportunidade, estou com um painel de gang, porem não consigo utilizar ele, eu coloco o ID do player mas n da pra clicar nos botões... são 3 Script vou mandar! Client local screenW, screenH = guiGetScreenSize() local x, y = (screenW/1366), (screenH/768) local dxfont0_icons = dxCreateFont("font/icons.ttf", 10) local dxfont1_icons = dxCreateFont("font/icons.ttf", 12) local ID = createElement("dxEditBox_IDDoJogadorRev") painel = false --[[ ><><><><><><><><><><><><><><><><><><><>< >< Painel Inicial >< ><><><><><><><><><><><><><><><><><><><>< --]] function painelgang () exports["Blur"]:dxDrawBluredRectangle(screenW * 0.6552, screenH * 0.3216, screenW * 0.1757, screenH * 0.3086, tocolor(255, 255, 255, 230)) dxDrawRectangle(screenW * 0.6552, screenH * 0.3216, screenW * 0.1757, screenH * 0.3086, tocolor(0, 0, 0, 168), false) dxDrawRectangle(screenW * 0.6552, screenH * 0.3216, screenW * 0.1757, screenH * 0.0365, tocolor(0, 0, 0, 168), false) dxDrawLine(screenW * 0.6552, screenH * 0.3568, screenW * 0.8302, screenH * 0.3568, tocolor(0, 221, 15, 254), 3, false) dxDrawText("ID do jogador :", screenW * 0.6625, screenH * 0.3698, screenW * 0.7328, screenH * 0.3932, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "left", "top", false, false, false, false, false) dxDrawText("Painel De Gang", screenW * 0.7013, screenH * 0.3229, screenW * 0.7884, screenH * 0.3464, tocolor(255, 255, 255, 255), 1.00, dxfont1_icons, "left", "top", false, false, false, false, false) dxDrawRectangle(screenW * 0.6552, screenH * 0.4063, screenW * 0.1757, screenH * 0.0365, CorAmarrar, false) dxDrawText("Amarrar", screenW * 0.7204, screenH * 0.4076, screenW * 0.7672, screenH * 0.4375, tocolor(255, 255, 255, 255), 1.00, dxfont1_icons, "left", "top", false, false, false, false, false) dxDrawRectangle(screenW * 0.6552, screenH * 0.4557, screenW * 0.1757, screenH * 0.0365, CorDesamarrar, false) dxDrawText("Desamarrar", screenW * 0.7086, screenH * 0.4583, screenW * 0.7745, screenH * 0.4883, tocolor(255, 255, 255, 255), 1.00, dxfont1_icons, "left", "top", false, false, false, false, false) dxDrawRectangle(screenW * 0.6552, screenH * 0.5013, screenW * 0.1757, screenH * 0.0365, CorSaquear, false) dxDrawText("Saquear", screenW * 0.7204, screenH * 0.5039, screenW * 0.7650, screenH * 0.5339, tocolor(255, 255, 255, 255), 1.00, dxfont1_icons, "left", "top", false, false, true, false, false) dxDrawRectangle(screenW * 0.6552, screenH * 0.5508, screenW * 0.1757, screenH * 0.0365, CorArrastar, false) dxDrawText("Arrastar", screenW * 0.7204, screenH * 0.5534, screenW * 0.7650, screenH * 0.5833, tocolor(255, 255, 255, 255), 1.00, dxfont1_icons, "left", "top", false, false, false, false, false) dxDrawEditBox("ID", screenW * 0.7328, screenH * 0.3698, screenW * 0.0644, screenH * 0.0234, false, 10, ID) CorAmarrar = tocolor(0, 0, 0, 170) if isCursorOnElement (screenW * 0.6552, screenH * 0.4063, screenW * 0.1757, screenH * 0.0365) then CorAmarrar = tocolor(0, 221, 15, 254) end CorDesamarrar = tocolor(0, 0, 0, 170) if isCursorOnElement (screenW * 0.6552, screenH * 0.4557, screenW * 0.1757, screenH * 0.0365) then CorDesamarrar = tocolor(0, 221, 15, 254) end CorSaquear = tocolor(0, 0, 0, 170) if isCursorOnElement (screenW * 0.6552, screenH * 0.5013, screenW * 0.1757, screenH * 0.0365) then CorSaquear = tocolor(0, 221, 15, 254) end CorArrastar = tocolor(0, 0, 0, 170) if isCursorOnElement (screenW * 0.6552, screenH * 0.5508, screenW * 0.1757, screenH * 0.0365) then CorArrastar = tocolor(0, 221, 15, 254) end end --[[ ><><><><><><><><><><><><><><><><><><><>< >< Configurações N Altere >< ><><><><><><><><><><><><><><><><><><><>< --]] function convertTime(ms) local min = math.floor ( ms/60000 ) local sec = math.floor( (ms/1000)%60 ) return min, sec end function AbrirPainel () if painel == false then addEventHandler ( "onClientRender", root, painelsamu ) painel = true showCursor ( true ) playSoundFrontEnd ( 43 ) else removeEventHandler ( "onClientRender", root, painelsamu ) painel = false showCursor ( false ) playSoundFrontEnd ( 43 ) end end addEvent ( "TS:AbrirGangster", true) addEventHandler ( "TS:AbrirGangster", getRootElement(), AbrirPainel ) function Saquear (_,state) if painel == true then if state == "down" then if isCursorOnElement ( screenW * 0.6552, screenH * 0.5013, screenW * 0.1757, screenH * 0.0365 ) then local getID = tonumber(getElementData(ID, "text")) if type(getID) == "number" then playSoundFrontEnd ( 43 ) setElementData(ID, "state", false) triggerServerEvent( "TS:Saquear", getLocalPlayer(), localPlayer, getID) end end end end end addEventHandler ("onClientClick", root, Saquear ) function Amarrar (_,state) if painel == true then if state == "down" then if isCursorOnElement ( screenW * 0.6552, screenH * 0.4063, screenW * 0.1757, screenH * 0.0365 ) then local getID = tonumber(getElementData(ID, "text")) if type(getID) == "number" then playSoundFrontEnd ( 43 ) setElementData(ID, "state", false) triggerServerEvent( "TS:Amarrar", getLocalPlayer(), localPlayer, getID) end end end end end addEventHandler ("onClientClick", root, Amarrar ) function Desamarrar (_,state) if painel == true then if state == "down" then if isCursorOnElement ( screenW * 0.6552, screenH * 0.4557, screenW * 0.1757, screenH * 0.0365 ) then local getID = tonumber(getElementData(ID, "text")) if type(getID) == "number" then playSoundFrontEnd ( 43 ) setElementData(ID, "state", false) triggerServerEvent( "TS:Desamarrar", getLocalPlayer(), localPlayer, getID) end end end end end addEventHandler ("onClientClick", root, Desamarrar ) function Arrastar (_,state) if painel == true then if state == "down" then if isCursorOnElement ( screenW * 0.6552, screenH * 0.5508, screenW * 0.1757, screenH * 0.0365 ) then local getID = tonumber(getElementData(ID, "text")) if type(getID) == "number" then playSoundFrontEnd ( 43 ) setElementData(ID, "state", false) triggerServerEvent( "TS:Arrastar", getLocalPlayer(), localPlayer, getID) end end end end end addEventHandler ("onClientClick", root, Arrastar ) function Edit1 (_,state) if painel == true then if state == "down" then if isCursorOnElement ( screenW * 0.7328, screenH * 0.3698, screenW * 0.0644, screenH * 0.0234 ) then setElementData(ID, "state", true) end end end end addEventHandler ("onClientClick", root, Edit1 ) function isCursorOnElement ( x, y, w, h ) local mx, my = getCursorPosition () local fullx, fully = guiGetScreenSize () cursorx, cursory = mx*fullx, my*fully if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end Edit BindPainel = "n" -------- Coloque a bind entre as "" ACL = "Gang" -------- Coloque a acl entre as "" PorcentagemAssalto = 7 TempoParaSerAssaltado = 10 --( Em Minutos ) server function getPlayerID(id) v = false for i, player in ipairs (getElementsByType("player")) do if getElementData(player, "ID") == id then v = player break end end return v end function AbrirPainelServer (source) login = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..login, aclGetGroup(ACL)) then triggerClientEvent(source, "TS:AbrirGangster", getRootElement()) end end function BindRestartScript () for index, player in ipairs(getElementsByType("player")) do bindKey ( player, BindPainel, "down", AbrirPainelServer ) end end addEventHandler( "onResourceStart", getResourceRootElement(getThisResource()), BindRestartScript ) function BindEntrarServidor () bindKey(source, BindPainel, "down", AbrirPainelServer ) end addEventHandler( "onPlayerJoin", getRootElement(), BindEntrarServidor ) function UnBindDesligarScript (player) for index, player in ipairs(getElementsByType("player")) do unbindKey(player, BindPainel, "down", AbrirPainelServer ) end end addEventHandler( "onResourceStop", getResourceRootElement(getThisResource()), UnBindDesligarScript ) function Saquear (source, getID) local Jogador = getPlayerID(getID) if not isElement(Jogador) then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffJogador não encontrado!") else local nick_do_jogador = getPlayerName ( Jogador ) local nick_do_assaltante = getPlayerName ( source ) local jX, jY, jZ = getElementPosition (Jogador) local pX, pY, pZ = getElementPosition (source) local dist = getDistanceBetweenPoints3D ( pX, pY, pZ, jX, jY, jZ) local SaqueadoP = getElementData(Jogador, "saqueado") local MoneyJogador = getPlayerMoney(Jogador) local MoneyAssalto = PorcentagemAssalto/100 * MoneyJogador local Verificar = getElementData ( Jogador, "amarrado" ) or false if Verificar == false then triggerClientEvent(Jogador, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺#ffffff #ffffffO jogador não esta amarrado", "info") else if SaqueadoP == true then triggerClientEvent(Jogador, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺#ffffff #ffffffO jogador ja foi saqueado recentemente", "info") else if dist <= 5 then setElementData(Jogador,"saqueado", true ) triggerClientEvent(Jogador, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺#ffffff #ffffff Você foi saqueado pelo assaltante "..nick_do_assaltante, "info") triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺#ffffff #ffffff Você saqueou Jogador "..nick_do_jogador.." com sucesso!", "info") givePlayerMoney(source, MoneyAssalto) takePlayerMoney(Jogador, MoneyAssalto) setTimer(function() setElementData(Jogador, "saqueado", false) end, TempoParaSerAssaltado*60000, 1) else triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺#ffffff #ffffffVocê esta Muito longe do Jogador!", "info") end end end end end addEvent ( "TS:Saquear", true) addEventHandler ( "TS:Saquear", getRootElement(), Saquear ) function Amarrar (source, getID) local Jogador = getPlayerID(getID) if not isElement(Jogador) then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffJogador não encontrado!") else local nick_do_jogador = getPlayerName ( Jogador ) local nick_do_assaltante = getPlayerName ( source ) local jX, jY, jZ = getElementPosition (Jogador) local pX, pY, pZ = getElementPosition (source) local dist = getDistanceBetweenPoints3D ( pX, pY, pZ, jX, jY, jZ) local Verificar = getElementData ( Jogador, "amarrado" ) or false if Verificar == true then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺#ffffff #ffffff Este jogador ja esta amarrado.", "info") else if dist <= 5 then setElementData(Jogador,"amarrado", true ) setElementFrozen( Jogador, true ) toggleControl(Jogador, "fire", false) setPedAnimation( Jogador, "GRAVEYARD", "mrnM_loop", -1, true, false, false, false) triggerClientEvent(Jogador, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺#ffffff #ffffff Você foi amarrado pelo assaltante "..nick_do_assaltante, "info") triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺#ffffff #ffffff Você amarrou o Jogador "..nick_do_jogador.." com sucesso!", "info") else triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺#ffffff #ffffffVocê esta Muito longe do Jogador!", "info") end end end end addEvent ( "TS:Amarrar", true) addEventHandler ( "TS:Amarrar", getRootElement(), Amarrar ) function Desamarrar (source, getID) local Jogador = getPlayerID(getID) if not isElement(Jogador) then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffJogador não encontrado!") else local nick_do_jogador = getPlayerName ( Jogador ) local nick_do_assaltante = getPlayerName ( source ) local jX, jY, jZ = getElementPosition (Jogador) local pX, pY, pZ = getElementPosition (source) local dist = getDistanceBetweenPoints3D ( pX, pY, pZ, jX, jY, jZ) local Verificar = getElementData ( Jogador, "amarrado" ) or false if Verificar == false then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺#ffffff #ffffff Este jogador ja esta desamarrado.", "info") else if dist <= 5 then setElementData(Jogador,"amarrado", false ) setElementFrozen( Jogador, false ) toggleControl(Jogador, "fire", true) setPedAnimation( Jogador, nil) triggerClientEvent(Jogador, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺#ffffff #ffffff Você foi desamarrado pelo assaltante "..nick_do_assaltante, "info") triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺#ffffff #ffffff Você desamarrou o Jogador "..nick_do_jogador.." com sucesso!", "info") else triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺#ffffff #ffffffVocê esta Muito longe do Jogador!", "info") end end end end addEvent ( "TS:Desamarrar", true) addEventHandler ( "TS:Desamarrar", getRootElement(), Desamarrar ) function Arrastar (source, getID) local Jogador = getPlayerID(getID) if not isElement(Jogador) then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffJogador não encontrado!") else local nick_do_jogador = getPlayerName ( Jogador ) local nick_do_assaltante = getPlayerName ( source ) local jX, jY, jZ = getElementPosition (Jogador) local pX, pY, pZ = getElementPosition (source) local dist = getDistanceBetweenPoints3D ( pX, pY, pZ, jX, jY, jZ) local Verificar = getElementData ( Jogador, "amarrado" ) or false local x, y, z = getElementPosition ( source ) local Int = getElementInterior ( source ) if Verificar == false then triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺#ffffff #ffffffO jogador não testa amarrado", "info") else if dist <= 5 then removePedFromVehicle(Jogador) setElementPosition(Jogador, x, y, z) setElementInterior(Jogador, Int) setPedAnimation( Jogador, "GRAVEYARD", "mrnM_loop", -1, true, false, false, false) triggerClientEvent(Jogador, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺#ffffff #ffffff Você foi arrastado pelo assaltante "..nick_do_assaltante, "info") triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺#ffffff #ffffff Você arrastou o Jogador "..nick_do_jogador.." com sucesso!", "info") else triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺#ffffff #ffffffVocê esta Muito longe do Jogador!", "info") end end end end addEvent ( "TS:Arrastar", true) addEventHandler ( "TS:Arrastar", getRootElement(), Arrastar )
-
oq posso fazer pra tirar o conflito?
-
Pronto fiz isso, mas na hora de dar a tag so funciona os botao do painel policial, os da corp de dar e remover nao funciona, sabe oque é?
-
PMESPTAG = aclCreateGroup ( "Dono PMESP" ) PMESP = aclCreateGroup ( "PMESP" ) PAINEL = aclCreateGroup ( "ComandosPolicia" ) function tagPM(thePlayer) login = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user."..login, aclGetGroup("Dono PMESP")) then triggerClientEvent(thePlayer, "PMESPtag", getRootElement()) else end end addCommandHandler ("tagpm", tagPM) -------------------------------- function addPMESP (jogador) local gett = getTeamName(getPlayerTeam(jogador)) if isGuestAccount(getPlayerAccount(jogador)) then outputChatBox ("#FF0000[#0000FFErro ]#FFFFFFEsse jogador não está logado", source, 255,255,255, true) else if gett == false then aclGroupAddObject (aclGetGroup("PMESP"), "user."..getAccountName(getPlayerAccount(jogador))) outputChatBox ("#FF0000[SPR]#FFFFFFVocê adicionou o jogador " ..getPlayerName(jogador).." ao grupo da #0000FF PMESP", source, 255,255,255, true) outputChatBox ("#FF0000[SPR]#FFFFFFVocê ganhou Tag da #0000FF PMESP", jogador, 255,255,255, true) else outputChatBox ("#FF0000[SPR]#FFFFFFO jogador já está com Tag", source, 255,255,255, true) end end end addEvent ("addPMESP", true) addEventHandler ("addPMESP", getRootElement(), addPMESP) ---------------- function removePMESP (jogador) local conta = getAccountName ( getPlayerAccount ( jogador ) ) if isGuestAccount(getPlayerAccount(jogador)) then return outputChatBox ("#FF0000[SPR]#FFFFFFO jogador não está logado", source, 255,255,255, true) end if isObjectInACLGroup ("user."..conta, aclGetGroup ( "PMESP" ) ) then aclGroupRemoveObject (aclGetGroup("PMESP"), "user."..getAccountName(getPlayerAccount(jogador))) outputChatBox ("#FF0000[SPR]#FFFFFFVocê removeu o jogador "..getPlayerName(jogador).." do grupo da #0000FF PMESP", source, 255,255,255, true) else outputChatBox ("#FF0000[SPR]#FFFFFFO jogador não está com Tag", source, 255,255,255, true) end end addEvent ("removePMESP", true) addEventHandler ("removePMESP", getRootElement(), removePMESP) ------------------- function addpainel (jogador) local gett = getTeamName(getPlayerTeam(jogador)) if isGuestAccount(getPlayerAccount(jogador)) then outputChatBox ("#FF0000[#0000FFErro ]#FFFFFFEsse jogador não está logado", source, 255,255,255, true) else if gett == false then aclGroupAddObject (aclGetGroup("ComandosPolicia"), "user."..getAccountName(getPlayerAccount(jogador))) outputChatBox ("#FF0000[SPR]#FFFFFFVocê deu ao jogador " ..getPlayerName(jogador).." acesso ao #0000FF Painel de Polícia", source, 255,255,255, true) outputChatBox ("#FF0000[SPR]#FFFFFFVocê ganhou acesso ao #0000FFPainel de Polícia", jogador, 255,255,255, true) else outputChatBox ("#FF0000[SPR]#FFFFFFO jogador já está com Painel", source, 255,255,255, true) end end end addEvent ("addpainel", true) addEventHandler ("addpainel", getRootElement(), addpainel) ---------- function removepainel (jogador) local conta = getAccountName ( getPlayerAccount ( jogador ) ) if isGuestAccount(getPlayerAccount(jogador)) then return outputChatBox ("#FF0000[SPR]#FFFFFFO jogador não está logado", source, 255,255,255, true) end if isObjectInACLGroup ("user."..conta, aclGetGroup ( "ComandosPolicia" ) ) then aclGroupRemoveObject (aclGetGroup("ComandosPolicia"), "user."..getAccountName(getPlayerAccount(jogador))) outputChatBox ("#FF0000[SPR]#FFFFFFVocê removeu o #0000FF Painel de Polícia #FFFFFF do jogador "..getPlayerName(jogador).." ", source, 255,255,255, true) else outputChatBox ("#FF0000[SPR]#FFFFFFO jogador não tem Painel", source, 255,255,255, true) end end addEvent ("removepainel", true) addEventHandler ("removepainel", getRootElement(), removepainel) aqui!!! na hora que vou trocar os Nomes Simplesmente não, ja tentei troca so as tags mas buga, fica colocando nas tags anteriores .... sou novo com script se alguem conseguir me ajudar agradeço!
-
Boa tarde!! Criei um painel de TAG porem ele n ta entrando, na verdade peguei um que ja tava criado, e fui alterando os nomes pra fazer para a outra corporação so que acabou nao abrindo painel, podem me ajudar?
-
Boa tarde a todos! Gostaria de criar um chat de voz privado, aonde se ativasse por um comando e apertasse uma letra para falar (COPOM POLICIAL) (CHAT GANG), porem so sei o basico de programação Lua, alguem pode me ajudar?
-
Interessante, como que faz?