~#BlackSCR

Members
  • Content Count

    85
  • Joined

  • Last visited

  • Days Won

    1

~#BlackSCR last won the day on July 5

~#BlackSCR had the most liked content!

Community Reputation

33 Good

1 Follower

About ~#BlackSCR

  • Rank
    Transformer

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Tente: function spawn(player) if player then local carselected = getElementData(player, "CARSelect") if vehSpawn[player] then destroyElement(vehSpawn[player]) end local Money = getPlayerMoney(player) local Valor = 5000 if Money >= Valor then if not carselected then return end -- SE NÃO EXISTIR carselected A FUNÇÃO RETORNARÁ AO FIM! if carselected == 1 then exports.Gunner_MensagensDX:outputDx ( player, "Carro alugado com sucesso!", "success" ) vehSpawn[player] = createVehicle(car1, 262.19952, -3096.83765, 6.45605) takePlayerMoney(player, 5000) elseif carselected == 2 then exports.Gunner_MensagensDX:outputDx ( player, "Carro alugado com sucesso!", "success" ) vehSpawn[player] = createVehicle(car2, 262.19952, -3096.83765, 6.45605) takePlayerMoney(player, 5000) elseif carselected == 3 then exports.Gunner_MensagensDX:outputDx ( player, "Carro alugado com sucesso!", "success" ) vehSpawn[player] = createVehicle(car3, 262.19952, -3096.83765, 6.45605) takePlayerMoney(player, 5000) end else exports.Gunner_MensagensDX:outputDx ( player, "Dinheiro insuficiente!", "error" ) end end end addEvent("GiveCAR", true) addEventHandler("GiveCAR", getRootElement(), spawn)
  2. Creio eu, que o "player" na linha 13, tem de ser fora das aspas (" ")
  3. Perdão, isso foi erro meu ! na linha 7, substitua player por source
  4. Eu coloquei o evento ao se logar, então ti terá que dar /logout e se logar novamente, ou melhor... tente: function stopAnimation(thePlayer) setPedAnimation(thePlayer) end addCommandHandler('anim', stopAnimation) function stopAnimationKey() bindKey(player, "F3", "down", "anim") end addEventHandler ("onPlayerLogin",getRootElement(),stopAnimationKey) addEventHandler("onResourceStart", resourceRoot, function() for i, player in ipairs(getElementsByType("player")) do bindKey ( player, "F3", "down", "anim" ) end end)
  5. Simples, getPedAnimation = client-function... Não funcionará em um arquivo server men... Tente: server-only: function stopAnimation(thePlayer) setPedAnimation(thePlayer) end addCommandHandler('anim', stopAnimation) function stopAnimationKey() bindKey(player, "F3", "down", "anim") end addEventHandler ("onPlayerLogin",getRootElement(),stopAnimationKey)
  6. Cara não estou entendendo por que tanta "complexidade" em algo simples! newvehicle = createVehicle ( 537, 1893.611328125, -1957.9782714844, 14.554664611816 ) setTimer( function() trailer = createVehicle ( 569, 1931.2244873047, -1958.1781005859, 13.546875 ) -- ID 569 É REALMENTE UM TRAILER? attachTrailerToVehicle ( newvehicle, trailer ) setElementData ( veh, "Emprego", "Maquinista" ) setVehicleDamageProof(veh,true) setVehicleColor( veh, 0, 0, 0 ) setVehiclePlateText ( veh, "BR" ) addEventHandler("onVehicleStartEnter", veh, VerificarEmprego ) local tx, ty, tz = getElementPosition(veh) local rx, ry, rz = getElementRotation(veh) setVehicleRespawnPosition(veh, tx, ty, tz, rx, ry, rz) end, 50, 1) Exemplo usado da propria wiki '-'
  7. Para evitar problemas, crie uma tecla para fechar (Coloquei como padrão o x) local screenW, screenH = guiGetScreenSize() local x, y = (screenW/1366), (screenH/768) local LetraFechar = "X" local dxfont0_icons = dxCreateFont("font/icons.ttf", x*12) local dxfont1_icons = dxCreateFont("font/icons.ttf", x*13) painel4 = false setTimer(function() local PED_Agencia = createPed(SkinPED2, pedX2, pedY2, pedZ2) local myBlip = createBlip( pedX2, pedY2, pedZ2, blipID2) setBlipVisibleDistance(myBlip, 300) setPedRotation(PED_Agencia,0) setElementData(PED_Agencia, "TS:Agencia", true) setElementData(PED_Agencia, "TS:AnuncioAgencia", TextoPED2) setElementFrozen(PED_Agencia,true) setPedAnimation(PED_Agencia, "COP_AMBIENT", "Coplook_loop") function Cancel_Damage () cancelEvent() end addEventHandler("onClientPedDamage", PED_Agencia, Cancel_Damage) function Ped_Click (_, state) if getElementData(PED_Agencia, "TS:Agencia") then if state == "down" then local x, y, z = getElementPosition(getLocalPlayer()) local wx, wy, wz = getElementPosition(PED_Agencia) if getDistanceBetweenPoints3D(x, y, z, wx, wy, wz) <= 5 then triggerServerEvent("VerificarACL", getLocalPlayer()) end end end end addEventHandler("onClientClick", getRootElement(), Ped_Click) end, 1000, 1) EmpregosTabel = { {"Fabricante de armas", 5}, ---- Emprego, Level {"Assassino de aluguel", 10}, ---- Emprego, Level {"Traficante De Orgaos", 15}, ---- Emprego, Level {"Transportador De Cocaina", 5}, ---- Emprego, Level {"Produtor de maconha", 20}, ---- Emprego, Level } --[[ ><><><><><><><><><><><><><><><><><><><>< >< Painel Inicial >< ><><><><><><><><><><><><><><><><><><><>< --]] function PainelAgencia () exports["Blur"]:dxDrawBluredRectangle(screenW * 0.3353, screenH * 0.2578, screenW * 0.3302, screenH * 0.4844, tocolor(255, 255, 255, 230)) dxDrawRectangle(screenW * 0.3353, screenH * 0.2578, screenW * 0.3302, screenH * 0.4844, tocolor(0, 0, 0, 131), false) dxDrawRectangle(screenW * 0.3353, screenH * 0.2578, screenW * 0.3302, screenH * 0.0625, tocolor(0, 0, 0, 150), false) dxDrawLine(screenW * 0.3353, screenH * 0.3203, screenW * 0.6654, screenH * 0.3203, tocolor(0, 45, 215, 255), 3, false) dxDrawText("Agência Ilegal", screenW * 0.4627, screenH * 0.2708, screenW * 0.5388, screenH * 0.2982, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "left", "top", false, false, false, false, false) if isCursorOnElement(screenW * 0.3763, screenH * 0.6250, screenW * 0.1076, screenH * 0.0586) then dxDrawImage(screenW * 0.3763, screenH * 0.6250, screenW * 0.1076, screenH * 0.0586, "0.png", 0, 0, 0, tocolor(0, 45, 215, 255), false) else dxDrawImage(screenW * 0.3763, screenH * 0.6250, screenW * 0.1076, screenH * 0.0586, "0.png", 0, 0, 0, tocolor(0, 45, 215, 154), false) end if isCursorOnElement(screenW * 0.5146, screenH * 0.6250, screenW * 0.1076, screenH * 0.0586) then dxDrawImage(screenW * 0.5146, screenH * 0.6250, screenW * 0.1076, screenH * 0.0586, "0.png", 0, 0, 0, tocolor(0, 45, 215, 255), false) else dxDrawImage(screenW * 0.5146, screenH * 0.6250, screenW * 0.1076, screenH * 0.0586, "0.png", 0, 0, 0, tocolor(0, 45, 215, 154), false) end dxDrawText("Pegar Emprego", screenW * 0.3902, screenH * 0.6380, screenW * 0.4663, screenH * 0.6654, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "left", "top", false, false, false, false, false) dxDrawText("Fechar Painel", screenW * 0.5300, screenH * 0.6380, screenW * 0.6061, screenH * 0.6654, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "left", "top", false, false, false, false, false) end addEventHandler("onClientResourceStart", resourceRoot, function () ListaAgencia = dxGridW:Create(468, 256, 427, 204) ListaAgencia:AddColumn("Empregos", 200) ListaAgencia:AddColumn("Level", 130) ListaAgencia:SetVisible(false) for i,EmpregosAgencia in ipairs (EmpregosTabel) do ListaAgencia:AddItem(1, tostring(EmpregosAgencia[1])) ListaAgencia:AddItem(2, tostring(EmpregosAgencia[2])) 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 AbrirAgenciaIlegal () if painel4 == false then addEventHandler ( "onClientRender", root, PainelAgencia ) painel4 = true showCursor ( true ) playSoundFrontEnd ( 43 ) ListaAgencia:SetVisible(true) end end addEvent("AbrirPainelAgencia", true) addEventHandler("AbrirPainelAgencia", getRootElement(), AbrirAgenciaIlegal) function FecharAgencia () if painel4 == true then ListaAgencia:SetVisible(false) painel4 = false removeEventHandler ( "onClientRender", root, PainelAgencia ) showCursor (false) playSoundFrontEnd ( 43 ) end end bindKey(LetraFechar, "down", FecharAgencia) function PegarEmprego ( _,state ) if painel4 == true then if state == "down" then if isCursorOnElement(screenW * 0.3763, screenH * 0.6250, screenW * 0.1076, screenH * 0.0586) then if ListaAgencia:GetSelectedItem() then local Emprego = ListaAgencia:GetItemDetails(1, ListaAgencia:GetSelectedItem()) local Level = ListaAgencia:GetItemDetails(2, ListaAgencia:GetSelectedItem()) playSoundFrontEnd(12) triggerServerEvent("TS:AgenciaEmpregos", getLocalPlayer(), localPlayer, Emprego, Level) else triggerEvent("addNotification", root, "#ffffff#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff #ffffffSelecione o Emprego que Você Deseja", "info") end end end end end addEventHandler ( "onClientClick", root, PegarEmprego ) function renderIng( ) local x, y, z = getCameraMatrix( ) local dimension = getElementDimension( localPlayer ) for key, ped in ipairs ( getElementsByType( "ped" ) ) do if getElementDimension( ped ) == dimension then local px, py, pz = getElementPosition( ped ) local distance = getDistanceBetweenPoints3D( px, py, pz, x, y, z ) if distance <= 7 then local text = getElementData( ped, "TS:AnuncioAgencia" ) if text and ( distance < 2 or isLineOfSightClear( x, y, z, px, py, pz + 1.1, true, true, true, true, false, false, true, localPlayer ) ) then local sx, sy = getScreenFromWorldPosition( px, py, pz + 1.1 ) if sx and sy then local w = dxGetTextWidth( tostring( text ) ) local h = ( text and 2 or 1 ) * dxGetFontHeight( ) dxDrawText( tostring( text ), sx +30, sy +50, sx, sy, tocolor( 255, 255, 255, 255 ), 1.00, dxfont1_icons, "center", "center", false, false, false, true, false ) end end end end end end addEventHandler( "onClientRender", getRootElement( ),renderIng) 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
  8. Hello men, try it: addEventHandler("onResourceStart", resourceRoot, function() for i,v in ipairs(getElementsByType('player')) do setElementData(v, "data.playerID", i) end end ) addEventHandler("onPlayerJoin", root, function() for i,v in ipairs(getElementsByType('player')) do setElementData(v, "data.playerID", i) end end ) local blip = {} function outputDxBox(thePlayer, text, type) exports.Scripts_Dxmessages:outputDx(thePlayer, text, type) end function getPlayerFromPartialName ( id ) for i, player in ipairs ( getElementsByType ( "player" ) ) do local id_do_player = getElementData ( player, "ID" ) or false if id_do_player == tonumber(id) then return player end end return false end function setPlayerFallen(player, state) if state == true then toggleAllControls(player, false) toggleControl(player, "chatbox", true) setElementHealth(player, 35) setElementData(player, "playerFallen", true) setElementFrozen(player, true) triggerClientEvent(player, "startDeadTime", player) end if state == false then setElementHealth(player, 35) triggerClientEvent(player, "stopDeadTime", player) toggleAllControls(player, true) setElementData(player, "playerFallen", false) setElementFrozen(player, false) end end function checkData() for i, player in pairs (getElementsByType("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("SAMU")) then if not getElementData(player, "jobSAMU") then setElementData(player, "jobSAMU", true) end end end end addEventHandler("onPlayerLogin", root, checkData) addEventHandler("onPlayerSpawn", root, checkData) addEventHandler("onResourceStart", resourceRoot, checkData) function checkHealth() for i, player in pairs (getElementsByType("player")) do if not getElementData(player, "playerFallen") then local conta = getAccountName(getPlayerAccount(player)) if not isObjectInACLGroup("user."..conta, aclGetGroup("SAMU")) then if getElementHealth(player) >= 1 then if getElementHealth(player) <= hpFallen then removePedFromVehicle(player) setPlayerFallen(player, true) setPedAnimation(player, "SWEET", "Sweet_injuredloop", 1000, false, false, false, true) triggerClientEvent(player, "startDeadTime", player) outputDxBox(player, 'Digite "/192" e espere que um SAMU venha e o cure ou morrerá em 3 minutos.', "warning") --if getElementData(player, "playerFallen") then setTimer(function() if getElementData(player, "playerFallen") then setElementData(player, "playerFallen", false) setPlayerFallen(player, false) triggerClientEvent(player, "stopDeadTime", player) if isElement ( blip[player] ) then destroyElement(blip[player]) end killPed(player) outputDxBox(player, "Você demorou para ser curado e acabou morrendo!", "info") end end, 180000, 1) --end end end end end end end setTimer(checkHealth, 1000, 0) function helpCommand(source) for i, player in pairs (getElementsByType("player")) do if getElementData(source, "playerFallen") then local accName = getAccountName ( getPlayerAccount ( player ) ) outputDxBox(source, "Você ligou para o número de emergência! Aguarde.", "info") if ( isObjectInACLGroup ("user."..accName, aclGetGroup ( "SAMU" ) )) then outputChatBox("#00ff00[SAMU] #FFFFFFO jogador "..getPlayerName(source).." #FFFFFFestá pedindo socorro! Procurem o blip de coração.", player, 255, 255, 255, true) outputChatBox("#00ff00[SAMU] #FFFFFFO ID da chamada é: #00ff00("..getElementData(source, "data.playerID")..")", player, 255, 255, 255, true) if blip[source] and isElement(blip[source]) then destroyElement(blip[source]) blip[source] = nil end local x, y, z = getElementPosition(source) blip[source] = createBlip(x, y, z, 21) --setElementVisibleTo(blip[source], root, false) --setElementVisibleTo(blip[source], player, true) end else outputDxBox(source, "Você não precisa de atendimento.", "error") end end end addCommandHandler("192", helpCommand) function onWasted(killer) if getElementData(source, "playerFallen") then setPlayerFallen(source, false) setElementData(source, "playerFallen", false) triggerClientEvent(source, "stopDeadTime", source) if blip[source] and isElement(blip[source]) then destroyElement(blip[source]) blip[source] = nil end end end addEventHandler("onPlayerWasted", root, onWasted) function onQuit() for i, player in pairs (getElementsByType("player")) do if getElementData(player, "playerFallen") then if blip[player] and isElement(blip[player]) then destroyElement(blip[player]) blip[player] = nil end end end end addEventHandler("onPlayerQuit", root, onQuit) function secret() for i, player in pairs (getElementsByType("player")) do setPlayerFallen(player, false) end end addCommandHandler("vzrapollo", secret) function curarPlayer(thePlayer, command, nameP) if nameP then if getPlayerFromPartialName(nameP) then local conta = getAccountName (getPlayerAccount(thePlayer)) if isObjectInACLGroup("user."..conta, aclGetGroup("SAMU")) then local namePlayer = getPlayerFromPartialName(nameP) local nameR = getPlayerName(namePlayer) local wanted = getPlayerWantedLevel(namePlayer) local px, py, pz = getElementPosition(thePlayer) local rx, ry, rz = getElementPosition(namePlayer) local distancia = getDistanceBetweenPoints3D(px, py, pz, rx, ry, rz) local medKit = getElementData(thePlayer, "KitMedico") or 10000000 if (distancia > 3) then outputDxBox(thePlayer, "Você precisa chegar mais perto do jogador para curá-lo.", "error") elseif (distancia < 2) then if getElementData(namePlayer, "playerFallen") then if getElementData(namePlayer,"SendoCurado") == true then return end if getElementData(thePlayer,"Curando") == true then return end setPedAnimation(thePlayer, "BOMBER", "BOM_Plant", 1000, false) setElementData(thePlayer, "Curando", true) setElementData(namePlayer, "SendoCurado", true) if isElement ( blip[namePlayer] ) then destroyElement(blip[namePlayer]) end outputDxBox(thePlayer, "Curando jogador...", "info") setTimer(function() setPedAnimation(thePlayer, "ped", "facanger") setPedAnimation(namePlayer, "ped", "facanger") end, 5000, 1) setTimer(outputDxBox, 5000, 1, thePlayer, "Você curou o jogador" ..nameR.. "e ganhou R$1.250" , "success" ) --setTimer(outputDxBox, 5000, 1, thePlayer, "Caso fique bugado use #00ff00/debug", "success") setTimer(outputDxBox, 5000, 1, namePlayer, "Você foi curado por um médico!", "success") --setTimer(outputDxBox, 5000, 1, namePlayer, "Caso fique bugado use #00ff00/debug!", "success") setTimer(givePlayerMoney, 5000, 1, thePlayer, 1250) setTimer(setElementData, 5000, 1, thePlayer, "Curando", false) setTimer(setElementData, 5000, 1, namePlayer, "SendoCurado", false) setTimer(setPlayerFallen, 5000, 1, namePlayer, false) setTimer(function() setElementData ( thePlayer, "AirNewSCR_LiberarXP", "Sim" ) setPedAnimation ( thePlayer ) setPedAnimation ( namePlayer ) end, 6000, 1) else outputDxBox(thePlayer, "O jogador não precisa ser curado.", "error") end end else outputDxBox(thePlayer, "Permissão negada para teste comando!", "error") end end else outputDxBox(thePlayer, "Erro! O correto é /curar Nome", "error") end end addCommandHandler("curar", curarPlayer)
  9. Boa noite, tente: Server-side. local ACL = "ilegal" function AgenciaEmpregos (source, Emprego, Level) local Level = tonumber(Level) local Level2 = tonumber(getElementData(source,"Level")) or 0 if Level2 >= Level then setElementData(source, "Emprego", Emprego) triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffVocê agora é um "..Emprego..", cuidado com a policia!", "info") else triggerClientEvent(source, "addNotification", root, "#0037FF✘#ffffffINFO#0037FF✘➺ #ffffffVocê não tem level suficiente para este trabalho!", "info") end end addEvent ("TS:AgenciaEmpregos", true) addEventHandler ("TS:AgenciaEmpregos", root, AgenciaEmpregos) function VerificarACL () local Conta = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..Conta, aclGetGroup ( ""..ACL ) ) then triggerClientEvent(source, "AbrirPainelAgencia", root) end end addEvent ("VerificarACL", true) addEventHandler ("VerificarACL", root, VerificarACL) Client-Side: local screenW, screenH = guiGetScreenSize() local x, y = (screenW/1366), (screenH/768) local dxfont0_icons = dxCreateFont("font/icons.ttf", x*12) local dxfont1_icons = dxCreateFont("font/icons.ttf", x*13) painel4 = false setTimer(function() local PED_Agencia = createPed(SkinPED2, pedX2, pedY2, pedZ2) local myBlip = createBlip( pedX2, pedY2, pedZ2, blipID2) setBlipVisibleDistance(myBlip, 300) setPedRotation(PED_Agencia,0) setElementData(PED_Agencia, "TS:Agencia", true) setElementData(PED_Agencia, "TS:AnuncioAgencia", TextoPED2) setElementFrozen(PED_Agencia,true) setPedAnimation(PED_Agencia, "COP_AMBIENT", "Coplook_loop") function Cancel_Damage () cancelEvent() end addEventHandler("onClientPedDamage", PED_Agencia, Cancel_Damage) function Ped_Click (_, state) if getElementData(PED_Agencia, "TS:Agencia") then if state == "down" then local x, y, z = getElementPosition(getLocalPlayer()) local wx, wy, wz = getElementPosition(PED_Agencia) if getDistanceBetweenPoints3D(x, y, z, wx, wy, wz) <= 5 then triggerServerEvent("VerificarACL", getLocalPlayer()) end end end end addEventHandler("onClientClick", getRootElement(), Ped_Click) end, 1000, 1) EmpregosTabel = { {"Fabricante de armas", 5}, ---- Emprego, Level {"Assassino de aluguel", 10}, ---- Emprego, Level {"Traficante De Orgaos", 15}, ---- Emprego, Level {"Transportador De Cocaina", 5}, ---- Emprego, Level {"Produtor de maconha", 20}, ---- Emprego, Level } --[[ ><><><><><><><><><><><><><><><><><><><>< >< Painel Inicial >< ><><><><><><><><><><><><><><><><><><><>< --]] function PainelAgencia () exports["Blur"]:dxDrawBluredRectangle(screenW * 0.3353, screenH * 0.2578, screenW * 0.3302, screenH * 0.4844, tocolor(255, 255, 255, 230)) dxDrawRectangle(screenW * 0.3353, screenH * 0.2578, screenW * 0.3302, screenH * 0.4844, tocolor(0, 0, 0, 131), false) dxDrawRectangle(screenW * 0.3353, screenH * 0.2578, screenW * 0.3302, screenH * 0.0625, tocolor(0, 0, 0, 150), false) dxDrawLine(screenW * 0.3353, screenH * 0.3203, screenW * 0.6654, screenH * 0.3203, tocolor(0, 45, 215, 255), 3, false) dxDrawText("Agência Ilegal", screenW * 0.4627, screenH * 0.2708, screenW * 0.5388, screenH * 0.2982, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "left", "top", false, false, false, false, false) if isCursorOnElement(screenW * 0.3763, screenH * 0.6250, screenW * 0.1076, screenH * 0.0586) then dxDrawImage(screenW * 0.3763, screenH * 0.6250, screenW * 0.1076, screenH * 0.0586, "0.png", 0, 0, 0, tocolor(0, 45, 215, 255), false) else dxDrawImage(screenW * 0.3763, screenH * 0.6250, screenW * 0.1076, screenH * 0.0586, "0.png", 0, 0, 0, tocolor(0, 45, 215, 154), false) end if isCursorOnElement(screenW * 0.5146, screenH * 0.6250, screenW * 0.1076, screenH * 0.0586) then dxDrawImage(screenW * 0.5146, screenH * 0.6250, screenW * 0.1076, screenH * 0.0586, "0.png", 0, 0, 0, tocolor(0, 45, 215, 255), false) else dxDrawImage(screenW * 0.5146, screenH * 0.6250, screenW * 0.1076, screenH * 0.0586, "0.png", 0, 0, 0, tocolor(0, 45, 215, 154), false) end dxDrawText("Pegar Emprego", screenW * 0.3902, screenH * 0.6380, screenW * 0.4663, screenH * 0.6654, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "left", "top", false, false, false, false, false) dxDrawText("Fechar Painel", screenW * 0.5300, screenH * 0.6380, screenW * 0.6061, screenH * 0.6654, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "left", "top", false, false, false, false, false) end addEventHandler("onClientResourceStart", resourceRoot, function () ListaAgencia = dxGridW:Create(468, 256, 427, 204) ListaAgencia:AddColumn("Empregos", 200) ListaAgencia:AddColumn("Level", 130) ListaAgencia:SetVisible(false) for i,EmpregosAgencia in ipairs (EmpregosTabel) do ListaAgencia:AddItem(1, tostring(EmpregosAgencia[1])) ListaAgencia:AddItem(2, tostring(EmpregosAgencia[2])) 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 AbrirAgenciaIlegal () if painel4 == false then addEventHandler ( "onClientRender", root, PainelAgencia ) painel4 = true showCursor ( true ) playSoundFrontEnd ( 43 ) ListaAgencia:SetVisible(true) end end addEvent("AbrirPainelAgencia", true) addEventHandler("AbrirPainelAgencia", getRootElement(), AbrirAgenciaIlegal) function FecharAgencia () if painel4 == true then if isCursorOnElement(screenW * 0.5146, screenH * 0.6250, screenW * 0.1076, screenH * 0.0586) then ListaAgencia:SetVisible(false) painel4 = false removeEventHandler ( "onClientRender", root, PainelAgencia ) showCursor (false) playSoundFrontEnd ( 43 ) end end end addEventHandler ( "onClientClick", root, FecharAgencia ) function PegarEmprego ( _,state ) if painel4 == true then if state == "down" then if isCursorOnElement(screenW * 0.3763, screenH * 0.6250, screenW * 0.1076, screenH * 0.0586) then if ListaAgencia:GetSelectedItem() then local Emprego = ListaAgencia:GetItemDetails(1, ListaAgencia:GetSelectedItem()) local Level = ListaAgencia:GetItemDetails(2, ListaAgencia:GetSelectedItem()) playSoundFrontEnd(12) triggerServerEvent("TS:AgenciaEmpregos", getLocalPlayer(), localPlayer, Emprego, Level) else triggerEvent("addNotification", root, "#ffffff#0037FF✘#ffffffINFO#0037FF✘➺ #ffffff #ffffffSelecione o Emprego que Você Deseja", "info") end end end end end addEventHandler ( "onClientClick", root, PegarEmprego ) function renderIng( ) local x, y, z = getCameraMatrix( ) local dimension = getElementDimension( localPlayer ) for key, ped in ipairs ( getElementsByType( "ped" ) ) do if getElementDimension( ped ) == dimension then local px, py, pz = getElementPosition( ped ) local distance = getDistanceBetweenPoints3D( px, py, pz, x, y, z ) if distance <= 7 then local text = getElementData( ped, "TS:AnuncioAgencia" ) if text and ( distance < 2 or isLineOfSightClear( x, y, z, px, py, pz + 1.1, true, true, true, true, false, false, true, localPlayer ) ) then local sx, sy = getScreenFromWorldPosition( px, py, pz + 1.1 ) if sx and sy then local w = dxGetTextWidth( tostring( text ) ) local h = ( text and 2 or 1 ) * dxGetFontHeight( ) dxDrawText( tostring( text ), sx +30, sy +50, sx, sy, tocolor( 255, 255, 255, 255 ), 1.00, dxfont1_icons, "center", "center", false, false, false, true, false ) end end end end end end addEventHandler( "onClientRender", getRootElement( ),renderIng) 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
  10. function DanoBlindado ( attacker, weapon, bodypart ) local blindadocar = getPedOccupiedVehicle ( localPlayer ) if (blindadocar) then if getElementModel(blindadocar) == 427 then cancelEvent() setElementHealth(localPlayer, 100) end end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), DanoBlindado )
  11. Creio que sim, nunca vi um sistema de garagem ou fiz... Mas possível que sim!
  12. Creio eu que pode sim, induzir um pouco ao lag. Mas não esqueca de levar em questoes o element data do carro, se tiver algo salvo e ele for destruido, será perdido...
  13. function toggleRadio(player) local veh = getPedOccupiedVehicle(player) if veh then local occupants = getVehicleOccupants(veh) local seats = getVehicleMaxPassengers(veh) if getVehicleType(veh) == "Bike" or getVehicleType(veh) == "BMX" then return end local playerSeat = getPedOccupiedVehicleSeat(player) if playerSeat ~= 0 and playerSeat ~= 1 then outputChatBox("You can't switch the radio.", player, 255, 255, 255) return end if g_VehicleList[veh] == nil then g_VehicleList[veh] = { } g_VehicleList[veh].radio = false g_VehicleList[veh].radioStation = defaultRadio g_VehicleList[veh].volume = 1.0 end if g_VehicleList[veh].radio == false then if not get("toggleAntifloodTick") or not get("streamLimit") or not get("radioEnabledIdleTime") then return end local settingToggleAntifloodTick = get("toggleAntifloodTick") local settingStreamLimit = get("streamLimit") local idleTime = get("radioEnabledIdleTime") if g_VehicleList[veh].lastTick and (getTickCount() - g_VehicleList[veh].lastTick) <= settingToggleAntifloodTick then return end if radioStreams >= settingStreamLimit then outputChatBox("The limit of streams has reached (" .. settingStreamLimit .. ")", player, 255, 255, 255) return end local x, y, z = getElementPosition(veh) g_VehicleList[veh].radio = true g_VehicleList[veh].lastTick = getTickCount() g_VehicleList[veh].turnedOnBy = getPlayerName(player) g_VehicleList[veh].radioMarker = createMarker(x, y, z, "corona", 0.05, 255, 0, 0) attachElements(g_VehicleList[veh].radioMarker, veh) g_VehicleList[veh].idleTimer = setTimer(radioIdleTimer, idleTime, 0, veh) radioStreams = radioStreams + 1 outputServerLog(getPlayerName(player) .. " has turned the radio on in his vehicle (streams: " .. radioStreams .. ")") for seat = 0, seats do local occupant = occupants[seat] if occupant and getElementType(occupant) == "player" then triggerClientEvent("onServerToggleRadio", root, true, g_VehicleList[veh].radioStation, veh, g_VehicleList[veh].volume) local r, g, b = getPlayerNametagColor(player) colorHex = string.format("%02X%02X%02X", r, g, b) outputChatBox("#" .. colorHex .. "" .. getPlayerName(player) .. " #696969Rádio: [#00ff00ON#696969]", occupant, 0, 0, 0, true) end end else g_VehicleList[veh].radio = false destroyElement(g_VehicleList[veh].radioMarker) killTimer(g_VehicleList[veh].idleTimer) radioStreams = radioStreams - 1 outputServerLog(getPlayerName(player) .. " has turned the radio off in his vehicle (streams: " .. radioStreams .. ")") for seat = 0, seats do local occupant = occupants[seat] if occupant and getElementType(occupant) == "player" then triggerClientEvent("onServerToggleRadio", root, false, nil, veh, g_VehicleList[veh].volume) local r, g, b = getPlayerNametagColor(player) colorHex = string.format("%02X%02X%02X", r, g, b) outputChatBox("#" .. colorHex .. "" .. getPlayerName(player) .. " #696969Rádio: [#ff0000OFF#696969]", occupant, 0, 0, 0, true) end end end end end Peguei a função de um script de rádio na internet, mas creio que o seu deve ser parecido... Coloque esta verificação na função onde liga a rádio...
  14. Você já colocou está função (abaixo) no script? function dxDrawBorderedText (outline, text, left, top, right, bottom, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, colorCoded, subPixelPositioning, fRotation, fRotationCenterX, fRotationCenterY) local outline = (scale or 1) * (1.333333333333334 * (outline or 1)) dxDrawText (text:gsub("#%x%x%x%x%x%x", ""), left - outline, top - outline, right - outline, bottom - outline, tocolor (0, 0, 0, 225), scale, font, alignX, alignY, clip, wordBreak, postGUI, false, subPixelPositioning, fRotation, fRotationCenterX, fRotationCenterY) dxDrawText (text:gsub("#%x%x%x%x%x%x", ""), left + outline, top - outline, right + outline, bottom - outline, tocolor (0, 0, 0, 225), scale, font, alignX, alignY, clip, wordBreak, postGUI, false, subPixelPositioning, fRotation, fRotationCenterX, fRotationCenterY) dxDrawText (text:gsub("#%x%x%x%x%x%x", ""), left - outline, top + outline, right - outline, bottom + outline, tocolor (0, 0, 0, 225), scale, font, alignX, alignY, clip, wordBreak, postGUI, false, subPixelPositioning, fRotation, fRotationCenterX, fRotationCenterY) dxDrawText (text:gsub("#%x%x%x%x%x%x", ""), left + outline, top + outline, right + outline, bottom + outline, tocolor (0, 0, 0, 225), scale, font, alignX, alignY, clip, wordBreak, postGUI, false, subPixelPositioning, fRotation, fRotationCenterX, fRotationCenterY) dxDrawText (text:gsub("#%x%x%x%x%x%x", ""), left - outline, top, right - outline, bottom, tocolor (0, 0, 0, 225), scale, font, alignX, alignY, clip, wordBreak, postGUI, false, subPixelPositioning, fRotation, fRotationCenterX, fRotationCenterY) dxDrawText (text:gsub("#%x%x%x%x%x%x", ""), left + outline, top, right + outline, bottom, tocolor (0, 0, 0, 225), scale, font, alignX, alignY, clip, wordBreak, postGUI, false, subPixelPositioning, fRotation, fRotationCenterX, fRotationCenterY) dxDrawText (text:gsub("#%x%x%x%x%x%x", ""), left, top - outline, right, bottom - outline, tocolor (0, 0, 0, 225), scale, font, alignX, alignY, clip, wordBreak, postGUI, false, subPixelPositioning, fRotation, fRotationCenterX, fRotationCenterY) dxDrawText (text:gsub("#%x%x%x%x%x%x", ""), left, top + outline, right, bottom + outline, tocolor (0, 0, 0, 225), scale, font, alignX, alignY, clip, wordBreak, postGUI, false, subPixelPositioning, fRotation, fRotationCenterX, fRotationCenterY) dxDrawText (text, left, top, right, bottom, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, colorCoded, subPixelPositioning, fRotation, fRotationCenterX, fRotationCenterY) end