Jump to content

Hize

Members
  • Posts

    21
  • Joined

  • Last visited

Recent Profile Visitors

539 profile views

Hize's Achievements

Civilian

Civilian (7/54)

0

Reputation

  1. to com um chat RP aqui e eu queria sabe ,como faço para quem tiver da ACL : STAFF vai mostrar quem Falou no anonimo tipo [Anonimo] Nick - mensagem e quem nao tiver na ACL aparecer sem o nick server-side function getPlayerID(player) return getElementData(player,"ID") end function getPlayerIDG(thePlayer) return getElementData(thePlayer,"ID") end -------------------------------------------------------------------------------------------- DistanciaDoChatLocal = 80 -- Metros ComandoDoChatGlobal = "rp" -- Ex /g Mensagem ComandoDoChatGlobal2 = "twitter" -- Ex /g Mensagem ComandoDoChatGlobal3 = "olx" -- Ex /g Mensagem ComandoDoChatGlobal4 = "anonimo" -- Ex /g Mensagem ValorDoChatGlobal = 0 -- Dinheiro -------------------------------------------------------------------------------------------- -- 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 ) ) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Console" ) ) then outputChatBox("#ffffff[#FFFFFFLocal#ffffff] #106FE7*Staff #ffffff"..getPlayerName(source).. "[ID:"..getPlayerID(source).."]: #ffffff"..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Administrador" ) ) then outputChatBox("#ffffff[#FFFFFFLocal#ffffff] #106FE7*Staff #FFFFFF"..getPlayerName(source).."[ID:"..getPlayerID(source).."]: #ffffff"..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Super Moderador" ) ) then outputChatBox("#ffffff[#FFFFFFLocal#ffffff] #106FE7*Staff #FFFFFF"..getPlayerName(source).."[ID:"..getPlayerID(source).."]: #ffffff"..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Moderador2" ) ) then outputChatBox("#ffffff[#FFFFFFLocal#ffffff] #106FE7*Staff #FFFFFF"..getPlayerName(source).."[ID:"..getPlayerID(source).."]: #ffffff"..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Moderador" ) ) then outputChatBox("#ffffff[#FFFFFFLocal#ffffff] #106FE7*Staff #FFFFFF"..getPlayerName(source).."[ID:"..getPlayerID(source).."]: #ffffff"..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Vip" ) ) then outputChatBox("#ffffff[#FFFFFFLocal#ffffff] #40E0D0*Vip Simples #FFFFFF"..getPlayerName(source).."[ID:"..getPlayerID(source).."]: #ffffff"..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Vip2" ) ) then outputChatBox("#ffffff[#FFFFFFLocal#ffffff] #00FFFF*Vip Avançado #FFFFFF"..getPlayerName(source).."[ID:"..getPlayerID(source).."]: #ffffff"..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Everyone" ) ) then outputChatBox("#ffffff[#FFFFFFLocal#ffffff] "..getPlayerName(source).. "[ID:"..getPlayerID(source).."]: #ffffff"..tresc, gracze, 255, 255, 255, true) end end end end end setElementData (source, "ChatLocal:Delay",true) setTimer (setElementData, 100, 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)) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Console" ) ) then outputChatBox("#ffffff[#FFFFFFFora Do RP#ffffff] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).. "[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Administrador" ) ) then outputChatBox("#ffffff[#FFFFFFFora Do RP#ffffff] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Super Moderador" ) ) then outputChatBox("#ffffff[#FFFFFFFora Do RP#ffffff] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Moderador2" ) ) then outputChatBox("#ffffff[#FFFFFFFora Do RP#ffffff] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Moderador" ) ) then outputChatBox("#ffffff[#FFFFFFFora Do RP#ffffff] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Vip" ) ) then outputChatBox("#ffffff[#FFFFFFFora Do RP#ffffff] #40E0D0*Vip Simples #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Vip2" ) ) then outputChatBox("#ffffff[#FFFFFFFora Do RP#ffffff] #00FFFF*Vip Avançado #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Everyone" ) ) then outputChatBox("#ffffff[#FFFFFFFora Do RP#ffffff] "..getPlayerName(thePlayer).. "[ID:"..getPlayerID(thePlayer).."]: #ffffff#ffffff"..message, player, 255, 255, 255, true) end end end end setElementData ( thePlayer, "ChatGlobal:Delay1",true ) setTimer ( setElementData, 100, 1, thePlayer, "ChatGlobal:Delay1", false ) end addCommandHandler ( ComandoDoChatGlobal, adminchat ) -------------------------------------------------------------------------------------------- -- Chat Twitter function adminchat2 ( thePlayer, _, ... ) local message = table.concat ( { ... }, " " ) if ( isPlayerOnGroup ( thePlayer ) ) then for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( isPlayerOnGroup ( player ) ) then if getElementData (thePlayer, "ChatGlobal:Delay1", true) then outputChatBox ( MensagemFalandoRapidoDemaisGlobal, thePlayer, 255, 255, 255, true ) return end conta = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Console" ) ) then outputChatBox("#14B4E7[#14B4E7Twitter#14B4E7] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).. "[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Admin" ) ) then outputChatBox("#14B4E7[#14B4E7Twitter#14B4E7] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Super Moderador" ) ) then outputChatBox("#14B4E7[#14B4E7Twitter#14B4E7] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Moderador2" ) ) then outputChatBox("#14B4E7[#14B4E7Twitter#14B4E7] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Moderador" ) ) then outputChatBox("#14B4E7[#14B4E7Twitter#14B4E7] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Vip" ) ) then outputChatBox("#14B4E7[#14B4E7Twitter#14B4E7] #40E0D0*Vip Simples #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Vip2" ) ) then outputChatBox("#14B4E7[#14B4E7Twitter#14B4E7] #00FFFF*Vip Avançado #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Everyone" ) ) then outputChatBox("#14B4E7[#14B4E7Twitter#14B4E7] #ffffff"..getPlayerName(thePlayer).. "[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) end end end end setElementData ( thePlayer, "ChatGlobal:Delay2",true ) setTimer ( setElementData, 100, 1, thePlayer, "ChatGlobal:Delay2", false ) end addCommandHandler ( ComandoDoChatGlobal2, adminchat2 ) ----------------------------------------------------------- -- Chat olx function adminchat3 ( thePlayer, _, ... ) local message = table.concat ( { ... }, " " ) if ( isPlayerOnGroup ( thePlayer ) ) then for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( isPlayerOnGroup ( player ) ) then if getElementData (thePlayer, "ChatGlobal:Delay1", true) then outputChatBox ( MensagemFalandoRapidoDemaisGlobal, thePlayer, 255, 255, 255, true ) return end conta = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Console" ) ) then outputChatBox("#FF00EA[#FF00EAOLX#FF00EA] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).. "[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Admin" ) ) then outputChatBox("#FF00EA[#FF00EAOLX#FF00EA] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Super Moderador" ) ) then outputChatBox("#FF00EA[#FF00EAOLX#FF00EA] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Moderador2" ) ) then outputChatBox("#FF00EA[#FF00EAOLX#FF00EA] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Moderador" ) ) then outputChatBox("#FF00EA[#FF00EAOLX#FF00EA] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Vip" ) ) then outputChatBox("#FF00EA[#FF00EAOLX#FF00EA] #40E0D0*Vip Simples #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Vip2" ) ) then outputChatBox("#FF00EA[#FF00EAOLX#FF00EA] #00FFFF*Vip Avançado #ffffff"..getPlayerName(thePlayer).."[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Everyone" ) ) then outputChatBox("#FF00EA[#FF00EAOLX#FF00EA] #106FE7*Staff #ffffff"..getPlayerName(thePlayer).. "[ID:"..getPlayerID(thePlayer).."]: #ffffff"..message, player, 255, 255, 255, true) end end end end setElementData ( thePlayer, "ChatGlobal:Delay2",true ) setTimer ( setElementData, 100, 1, thePlayer, "ChatGlobal:Delay2", false ) end addCommandHandler ( ComandoDoChatGlobal3, adminchat3 ) -------------------------------------------------------------- -- Chat anonimo function adminchat4 ( thePlayer, _, ... ) local message = table.concat ( { ... }, " " ) if ( isPlayerOnGroup ( thePlayer ) ) then for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( isPlayerOnGroup ( player ) ) then if getElementData (thePlayer, "ChatGlobal:Delay1", true) then outputChatBox ( MensagemFalandoRapidoDemaisGlobal, thePlayer, 255, 255, 255, true ) return end conta = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Console" ) ) then outputChatBox("#838b83@Anónimo: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Admin" ) ) then outputChatBox("#838b83@Anónimo: #ffffff: "..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "SuperModerator" ) ) then outputChatBox("#838b83@Anónimo: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Moderator" ) ) then outputChatBox("#838b83@Anónimo: #ffffff"..message, player, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Everyone" ) ) then outputChatBox("#838b83@Anónimo: #ffffff"..message, player, 255, 255, 255, true) end end end end setElementData ( thePlayer, "ChatGlobal:Delay2",true ) setTimer ( setElementData, 100, 1, thePlayer, "ChatGlobal:Delay2", false ) end addCommandHandler ( ComandoDoChatGlobal4, adminchat4 ) --------------------------------------------------------------------- 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 --------------------------------------------------------------------------------------------
  2. function Virar_Veiculo ( source, Car ) local cx, cy, cz = getElementPosition ( Car ) local px, py, pz = getElementPosition ( source ) local distance = getDistanceBetweenPoints3D ( cx, cy, cz, px, py, pz ) outputChatBox("Carro Virado Com Sucesso.", player, 255, 255, 255, true) if ( distance <= 5 ) then local rX, rY, rZ = getElementRotation(Car) setTimer(function() setElementRotation(Car, 0, 0, (rx > 90 and rx < 270) and (rz + 100) or rz) end, 120000, 1) end end addEvent ("DNL:Virar_Veiculo", true) addEventHandler ("DNL:Virar_Veiculo", root, Virar_Veiculo)
  3. Sim isso eu sei so que em todo lugar que eu coloco ou o click nao funciona ou da erro
  4. Server-side function Virar_Veiculo ( source, Car ) local cx, cy, cz = getElementPosition ( Car ) local px, py, pz = getElementPosition ( source ) local distance = getDistanceBetweenPoints3D ( cx, cy, cz, px, py, pz ) outputChatBox("Carro Virado Com Sucesso.", player, 255, 255, 255, true) if ( distance <= 5 ) then local rX, rY, rZ = getElementRotation(Car) setElementRotation(Car, 0, 0, (rX > 90 and rX < 270) and (rZ + 180) or rZ) end end addEvent ("DNL:Virar_Veiculo", true) addEventHandler ("DNL:Virar_Veiculo", root, Virar_Veiculo) function ChamarB (source) local x, y, z = getElementPosition(source) local loc = getZoneName ( x, y, z ) local city = getZoneName ( x, y, z, true ) outputChatBox("#bebebeVocê chamou Uma Equipe de Policia, aguarde.", source, 255, 255, 255, true) for theKey,player in ipairs (getElementsByType("player")) do local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then exports.Scripts_Dxmessages:outputDx ( player, "#FF0000[COBOM] #FFFFFF"..getPlayerName(source).." #FFFFFF precisa de uma Equipe de Policia em "..loc.." ("..city..")", "warning" ) local blip = createBlipAttachedTo ( source, 30 ) setElementVisibleTo(blip, root, false) setElementVisibleTo(blip, player, true) setTimer ( function() destroyElement(blip) end, 270000, 1) end end end addCommandHandler("190", ChamarB) Client-Side function Click_Repair ( _, state, _, _, _, _, _, ClickCar) if state == "down" then if ( ClickCar ) then if ( getElementType ( ClickCar ) == "vehicle" ) then triggerServerEvent("DNL:Virar_Veiculo", root, localPlayer, ClickCar ) end end end end addEventHandler("onClientClick", root, Click_Repair) Como faço pra adicionar um tempo junto com uma animaçao Para o carro virar e pra uma certa acl poder ter esse acesso do Click
  5. Warning s.lua15: Bad argument @ 'getElementPosition' [Expected element at argument 1,got string'192'] Warning s.lua16: Bad argument @ 'getZoneName' [Expected vector3 at argument 1,got boolean] Warning s.lua17: Bad argument @ 'getZoneName' [Expected vector3 at argument 1,got boolean] Warning s.lua18: Bad argument @ 'outputChatBox' ['Expected boot at argument 5,got number "255"] ERROR s.lua20: attempt to call global 'getPlayerAccount' (a nil value)
  6. Esta dando erro na linha 15,16,17,18,20 function flipVehicle(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) local vehicle = getPedOccupiedVehicle(thePlayer) if vehicle then if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then local rX, rY, rZ = getElementRotation(vehicle) setElementRotation(vehicle, 0, 0, (rX > 90 and rX < 270) and (rZ + 180) or rZ) end end end addCommandHandler('desvirar', flipVehicle) function ChamarPolicia (source) local x, y, z = getElementPosition(source) local loc = getZoneName ( x, y, z ) local city = getZoneName ( x, y, z, true ) outputChatBox("#bebebeVocê chamou a policia, aguarde.", source, 255, 255, 255, true) for theKey,player in ipairs (getElementsByType("player")) do local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin") ) then outputChatBox("#bebebe"..getPlayerName(source).." precisa de um policial em "..loc.." ("..city..")", player, 255, 255, 255, true) local blip = createBlipAttachedTo ( source, 30 ) setElementVisibleTo(blip, root, false) setElementVisibleTo(blip, player, true) setTimer ( function() destroyElement(blip) end, 270000, 1) end end end addCommandHandler("192", ChamarPolicia)
  7. Até agora abriu man vlw qualquer erro eu volto aqui dnv
  8. continua dando o seguinte erro: server triggered clientside event open200,but event is not added clientside local screenW,screenH = guiGetScreenSize() local resW, resH = 1365,767 local x, y = (screenW/resW), (screenH/resH) painel = false function convertTime(ms) local min = math.floor ( ms/60000 ) local sec = math.floor( (ms/1000)%60 ) return min, sec end function painelbase () dxDrawRectangle((screenW - 323) / 2, (screenH - 465) / 2, 323, 465, tocolor(0, 0, 0, 185), false) dxDrawText("Ak 47", 657, 302, 710, 331, tocolor(255, 255, 255, 255), 2.00, "sans", "left", "center", false, false, false, false, false) dxDrawRectangle(519, 299, 323, 3, tocolor(67, 219, 0, 255), false) dxDrawImage(471, 321, 320, 110, "Img/30.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(519, 403, 323, 3, tocolor(67, 219, 0, 255), false) dxDrawRectangle(519, 181, 323, 3, tocolor(67, 219, 0, 255), false) dxDrawRectangle(519, 507, 323, 3, tocolor(67, 219, 0, 255), false) dxDrawText("Deagle", 644, 406, 697, 435, tocolor(255, 255, 255, 255), 2.00, "sans", "left", "center", false, false, false, false, false) dxDrawText("Uzi", 667, 184, 720, 213, tocolor(255, 255, 255, 255), 2.00, "sans", "left", "center", false, false, false, false, false) dxDrawImage(513, 221, 240, 110, "Img/28.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(509, 425, 256, 128, "Img/24.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Trafico De Armas", 548, 151, 824, 181, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Fechar", 650, 564, 86, 31, tocolor(255, 255, 255, 255), 1.50, "default-bold", "left", "top", false, false, false, false, false) end function painel_tempo () local timer = interpolateBetween(120000, 0, 0, 0, 0, 0, (getTickCount()-tick)/60000, "Linear") local minutes, seconds = convertTime(timer) dxDrawRectangle(17, 251, 116, 44, tocolor(0, 0, 0, 211), false) dxDrawRectangle(17, 242, 115, 19, tocolor(255, 255, 255, 255), false) dxDrawText("Tempo", 21, 245, 123, 261, tocolor(0, 0, 0, 254), 1.50, "default-bold", "center", "center", false, false, false, false, false) dxDrawText(""..minutes..":"..seconds, 33, 266, 122, 290, tocolor(255, 255, 255, 255), 2.00, "default", "center", "top", false, false, false, false, false) end ------------ [ ABRIR E FECHAR ]--------------------- function guiackapaTG() if painel == false then addEventHandler ("onClientRender", root, painelbase) tick = getTickCount() showCursor (true) painel = true end end addEvent("open200", true) addEventHandler("open200", getRootElement(), guiackapaTG) function fecharpainel (_,state) if painel == true then if state == "down" then if isCursorOnElement (640, 564, 86, 31) then removeEventHandler ("onClientRender", root, painelbase) showCursor (false) painel = false end end end end addEventHandler ("onClientClick", root, fecharpainel) ----------------------------------------------------- ------------ [ animaçao ]------------------------------ function click (_,state) if painel == true then if state == "down" then if isCursorOnElement(471, 321, 320, 110) then triggerServerEvent("anim4", localPlayer) addEventHandler ("onClientRender", root, painel_tempo) removeEventHandler ("onClientRender", root, painelbase) setTimer(function() removeEventHandler("onClientRender", root, painel_tempo) showCursor (false) painel = false end, 120000, 1) elseif isCursorOnElement(513, 221, 240, 110) then triggerServerEvent("animuzi", localPlayer) addEventHandler ("onClientRender", root, painel_tempo) removeEventHandler ("onClientRender", root, painelbase) setTimer(function() removeEventHandler("onClientRender", root, painel_tempo) showCursor (false) painel = false end, 120000, 1) elseif isCursorOnElement(509, 425, 256, 128) then triggerServerEvent("animdesert", localPlayer) addEventHandler ("onClientRender", root, painel_tempo) removeEventHandler ("onClientRender", root, painelbase) setTimer(function() removeEventHandler("onClientRender", root, painel_tempo) showCursor (false) painel = false end, 120000, 1) end end end end addEventHandler("onClientClick", root, click) 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
  9. sim Isso eu arrumei agr vou Ver se vai funcionar e ta faltando no server-side pra add a uzi deagle la so tem a da m4
  10. se passou um mês e estou de volta querendo resolver local base = createMarker (181.3017578125,1922.0390625,16.909183502197, "cylinder", 1.5, 0, 255, 0, 90) function open2 (source) triggerClientEvent (source, "open200", root) end addEventHandler ("onMarkerHit", base, open2) function animPlantar () setPedAnimation(source , "BD_FIRE", "wash_up", 2000, true, false, false, false) setTimer (giveWeapon, 2000, 1, source, 31, 1000) end addEvent("DeniS:AnimPlantar",true) addEventHandler("DeniS:AnimPlantar", root, animPlantar)
×
×
  • Create New...