Niick

Members
  • Content Count

    35
  • Joined

  • Last visited

Community Reputation

2 Neutral

About Niick

  • Rank
    Rat

Recent Profile Visitors

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

  1. Muito obrigado mesmo!
  2. Consegui muito obrigado. Vou tentar fazer o da samu sozinho agora pra ver se vai, te amoooo♥ Se eu quiser mudar em outros Scripts de Nome para ID, é a mesma coisa?
  3. Tentei não consegui
  4. Primeiramente Feliz Ano Novo, muitos anos de vida, eu fiz assim o Script, ta certinho? --[[ ################################################ # # # Script Criado Por # # FACEBOOK.COM/AIRNEWSCR # # # # # ################################################ --]] ------------------------------------------------- InteriorDP = 6 DimensaoDP = 0 Cmd01 = "a" -- Algema Cmd02 = "d" -- Desalgema Cmd03 = "c" -- Retira Armas Grupo = "Policial" Distancia_Comandos = 7 Deixar_Preso = createMarker ( 1535.73486, -1672.03137, 13.38281 -1, "cylinder", 10, 255, 255, 255, 0 ) Local_Preso = createMarker ( 264.08435, 77.60955, 1001.03906 -1, "cylinder", 2.5, 255, 255, 255, 0 ) setElementInterior ( Local_Preso, InteriorDP ) setElementDimension ( Local_Preso, DimensaoDP ) function emarker ( marker, md ) if md then if marker == Deixar_Preso then if getElementData ( source, "ocupacao" ) == "Policial" then setElementData ( source, "AirNewSCR_PrisaoArea", "Sim" ) exports.Scripts_OnMarkerMsgs_:create ( source, "Aviso: Aperte F9 para Abrir / Fechar o Painel de Prender do DP" ) end end end end addEventHandler ( "onPlayerMarkerHit", getRootElement ( ), emarker ) function lmarker ( marker, md ) if md then if marker == Deixar_Preso then setElementData ( source, "AirNewSCR_PrisaoArea", "Não" ) exports.Scripts_OnMarkerMsgs_:delete(source) end end end addEventHandler ( "onPlayerMarkerLeave", getRootElement ( ), lmarker ) function getPlayerFromID(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 function Algemar_Jogador ( thePlayer, _, nick ) if nick then if getPlayerFromID ( nick ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo ) ) then local player_a_ser_algemado = getPlayerFromID ( nick ) local nick_do_jogador = getPlayerName ( player_a_ser_algemado ) local nick_do_policial = getPlayerName ( thePlayer ) local jX, jY, jZ = getElementPosition (player_a_ser_algemado) local pX, pY, pZ = getElementPosition (thePlayer) local dist = getDistanceBetweenPoints3D ( pX, pY, pZ, jX, jY, jZ) if thePlayer == player_a_ser_algemado then return exports.Scripts_Textos:createNewDxMessage ( "Erro: Você não pode algemar você mesmo!", thePlayer, 255, 255, 255 ) end local Verificar = getElementData ( player_a_ser_algemado, "algemado" ) or false if Verificar == true then exports.Scripts_Textos:createNewDxMessage ( "Erro: Esse Jogador ja Esta Algemado!", thePlayer, 255, 255, 255 ) else if dist <= Distancia_Comandos then setElementData(player_a_ser_algemado,"algemado", true ) setElementFrozen( player_a_ser_algemado, true ) toggleControl(player_a_ser_algemado, "fire", false) setPedAnimation( player_a_ser_algemado, "GRAVEYARD", "mrnM_loop", -1, true, false, false, false) exports.Scripts_Textos:createNewDxMessage ( "Aviso: Você foi Algemado pelo Policial "..nick_do_policial, player_a_ser_algemado, 255, 255, 255 ) exports.Scripts_Textos:createNewDxMessage ( "Aviso: Você algemou o Jogador "..nick_do_jogador.." com Sucesso!", thePlayer, 255, 255, 255 ) else exports.Scripts_Textos:createNewDxMessage ( "Erro: Você esta Muito longe do Jogador! chegue mais Perto para poder Algema-lo!", thePlayer, 255, 255, 255 ) end end end end end end addCommandHandler( Cmd01, Algemar_Jogador) function Desalgemar_Jogador ( thePlayer, _, nick ) if nick then if ggetPlayerFromID ( nick ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo) ) then local player_a_ser_desalgemado = getPlayerFromID ( nick ) local nick_do_jogador = getPlayerName ( player_a_ser_desalgemado ) local nick_do_policial = getPlayerName ( thePlayer ) if thePlayer == player_a_ser_desalgemado then return exports.Scripts_Textos:createNewDxMessage ( "Erro: Você não pode desalgemar você mesmo!", thePlayer, 255, 255, 255 ) end local Verificar = getElementData ( player_a_ser_desalgemado, "algemado" ) or false if Verificar == false then exports.Scripts_Textos:createNewDxMessage ( "Erro: Esse Jogador não esta Algemado!", thePlayer, 255, 255, 255 ) else setElementData ( player_a_ser_desalgemado, "algemado", false ) setPedAnimation ( player_a_ser_desalgemado ) setElementFrozen ( player_a_ser_desalgemado, false ) toggleControl ( player_a_ser_desalgemado, "fire", true ) exports.Scripts_Textos:createNewDxMessage ( "Aviso: Você foi Desalgemado pelo Policial "..nick_do_policial, player_a_ser_desalgemado, 255, 255, 255 ) exports.Scripts_Textos:createNewDxMessage ( "Aviso: Você desalgemou o Jogador "..nick_do_jogador.." com Sucesso!", thePlayer, 255, 255, 255 ) end end end end end addCommandHandler( Cmd02, Desalgemar_Jogador) function Retirar_Armas ( source, cmd, pname ) if getElementData(source, "ocupacao" ) == "Policial" then local cliente = getPlayerFromID(pname) if isElement(cliente) then if cliente == source then exports.Scripts_Dxmessages:outputDx(source, "Erro: Você não pode Retirar suas Proprias Armas!", "error") return end local cx,cy,cz = getElementPosition(cliente) local x,y,z = getElementPosition(source) local dist = getDistanceBetweenPoints3D(x,y,z,cx,cy,cz) if dist <= 7 then takeAllWeapons ( cliente ) exports.Scripts_Dxmessages:outputDx(source, "Aviso: Você removeu todas as Armas do Jogador #ffffff"..getPlayerName(cliente).." #ffffffcom Sucesso!", "success") exports.Scripts_Dxmessages:outputDx(cliente, "Aviso: O Policial #ffffff"..getPlayerName(source).."#ffffff Confiscou todas as suas Armas!", "warning") end else exports.Scripts_Dxmessages:outputDx(source, "Erro: O Jogador Não Foi Encontrado!", "error") end end end addCommandHandler ( Cmd03, Retirar_Armas ) function Verificar_Emprego_Atual ( ) for i, player in ipairs(getElementsByType("player")) do local acc = getPlayerAccount(player) if acc and not isGuestAccount(acc) then local job = getElementData(player,'ocupacao') local accName = getAccountName (acc) if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo ) ) then setElementData ( player, "ocupacao", "Policial" ) setElementData ( player, "AirNewSCR_Entrada_PortaoDP", "Sim" ) setElementData ( player, "AirNew_Perm_Prender", "Sim" ) else setElementData ( player, "ocupacao", "Criminoso" ) setElementData ( player, "AirNewSCR_Entrada_PortaoDP", "Não" ) setElementData ( player, "AirNew_Perm_Prender", "Não" ) end end end end setTimer ( Verificar_Emprego_Atual, 1500, 0 ) local Prisao_Blip = createBlip ( 1535.89856, -1672.66479, 13.38281 ) setElementVisibleTo ( Prisao_Blip, root, false ) function Nivel_de_Procurado ( source, int ) if int == 0 then setPlayerWantedLevel ( source, int ) else local wl = getPlayerWantedLevel ( source ) if wl + int <= 6 then setPlayerWantedLevel ( source, wl+int ) else setPlayerWantedLevel ( source, 6 ) end end end addEvent("AirNewSCR_Nivel_de_Procurado", true) addEventHandler("AirNewSCR_Nivel_de_Procurado", getRootElement ( ), Nivel_de_Procurado ) function Mensagens_Exports ( source, msg ) exports.Scripts_Textos:createNewDxMessage ( msg, source, 255, 255, 255 ) end addEvent ( "AirNewSCR_Mensagens_Exports", true) addEventHandler ( "AirNewSCR_Mensagens_Exports", getRootElement ( ), Mensagens_Exports ) function Enviar_Prisao_Servidor ( Jogador, Numero, Formato, Motivo ) outputChatBox ( "#58ACFAPolicia: O Policial #ffffff"..getPlayerName(source).." #58ACFAPrendeu o Jogador #ffffff"..Jogador.."!", root, 255, 255, 255, true ) outputChatBox ( "#58ACFAPolicia: Pelo tempo de "..Numero.." "..Formato..", Motivo: "..Motivo.."!", root, 255, 255, 255, true ) Jogador_Func = getPlayerFromName ( Jogador ) Estrelas_Preso = getPlayerWantedLevel ( Jogador_Func ) givePlayerMoney ( source, Estrelas_Preso*1000 ) if Formato == "Segundo(s)" then Multiplicador = 1 elseif Formato == "Minuto(s)" then Multiplicador = 60 elseif Formato == "Hora(s)" then Multiplicador = 3600 elseif Formato == "Dia(s)" then Multiplicador = 86400 end TempoPrisao = Numero*Multiplicador setElementData ( Jogador_Func, "AirNew_Tempo_Prisao", TempoPrisao ) setElementData ( Jogador_Func, "AirNew_Preso", "Sim" ) setPlayerWantedLevel ( Jogador_Func, 0 ) takeAllWeapons ( Jogador_Func ) setElementData ( Jogador_Func, "Policia:Captura", false ) setElementData ( Jogador_Func, "Player:Msg", "" ) showCursor ( Jogador_Func, false) setControlState ( Jogador_Func, "sprint", false) setControlState ( Jogador_Func, "walk", false) setControlState ( Jogador_Func, "forwards", false) toggleAllControls ( Jogador_Func, true ) triggerClientEvent ( source, "CancelTimeParaPrender:Time", source ) if getElementData ( Jogador_Func, "algemado" ) == true then setElementData ( Jogador_Func, "algemado", false ) setPedAnimation ( Jogador_Func ) setElementFrozen ( Jogador_Func, false ) toggleControl ( Jogador_Func, "fire", true ) end end addEvent( "AirNew_Enviar_Prisao", true ) addEventHandler( "AirNew_Enviar_Prisao", getRootElement(), Enviar_Prisao_Servidor ) function Capturar_Jogador ( source, wantedlevel, vitima ) local x, y, z = getElementPosition ( vitima ) if x < -518 and y < 0 then -- SF time = 4 end if x >= -518 and y < 510 then -- LS time = 2 end if x >= -518 and y >= 510 then -- LV time = 4 end setElementData ( source, "PoliceToPrision:Time", tonumber(time*60) ) setTimer ( triggerClientEvent, 10000, 1, source, "ShowTimeParaPrender:Time", source ) exports.Scripts_Textos:createNewDxMessage ( "Você foi Capturado pelo Policial "..getPlayerName(source), vitima, 255, 255, 255 ) exports.Scripts_Textos:createNewDxMessage ( "Você tem "..time.." Minutos para Levar o Jogador para a Prisão!", source, 255, 255, 255 ) toggleAllControls ( vitima, false ) setElementVisibleTo ( Prisao_Blip, source, true ) end addEvent("AirNewSCR_Capturar_Jogador", true) addEventHandler("AirNewSCR_Capturar_Jogador", getRootElement(), Capturar_Jogador ) function Teleportar_Capturado_Veiculo ( state, player , vehicle , seat ) if state == true then if seat and isElement ( vehicle ) then warpPedIntoVehicle ( player, vehicle, seat ) end else removePedFromVehicle ( player ) end end addEvent ( "AirNewSCR_TeleportarVeiculo", true ) addEventHandler ( "AirNewSCR_TeleportarVeiculo", getRootElement ( ), Teleportar_Capturado_Veiculo ) function Remover_Jogador_Veiculo ( player ) removePedFromVehicle ( player ) end addEvent ( "AirNewSCR_Remover_Jogador_Veiculo", true ) addEventHandler ( "AirNewSCR_Remover_Jogador_Veiculo", getRootElement ( ), Remover_Jogador_Veiculo ) function Teleportar_Capturado_Player ( source, type, value, x, y ,z) local Policial = getElementData ( source, "Policia:Captura" ) if isElement ( Policial ) and not isPedInVehicle ( source ) then if type == "INT" then setElementInterior ( source, value ) elseif type == "DIM" then setElementDimension ( source, value ) end setElementPosition ( source, x, y ,z ) end end addEvent ( "AirNewSCR_TeleportarPlayer", true ) addEventHandler ( "AirNewSCR_TeleportarPlayer", getRootElement ( ), Teleportar_Capturado_Player ) function Liberar_Capturado ( source ) for p, player in ipairs ( getElementsByType ( "player" ) ) do job = getElementData ( player,"ocupacao" ) or "Nenhum" capturado = getElementData ( player, "Policia:Captura" ) if job == "Criminoso" and isElement ( capturado ) then if capturado == source then Soltar_Fail_Captura ( source, player ) end end end end addEvent ( "AirNewSCR_FalharCapturaLiberar", true ) addEventHandler ( "AirNewSCR_FalharCapturaLiberar", getRootElement ( ), Liberar_Capturado ) function Soltar_Fail_Captura ( policial, vitima ) exports.Scripts_Textos:createNewDxMessage ( "O policial falhou e voce está solto novamnte, fuja",vitima, 255, 255, 255 ) exports.Scripts_Textos:createNewDxMessage ( "Voce falhou e o criminoso está solto novamente",policial, 255, 255, 255 ) setElementVisibleTo ( Prisao_Blip, policial, false ) setElementData ( vitima, "Policia:Captura", false ) setElementData ( vitima, "Player:Msg", "" ) showCursor ( vitima, false ) setControlState ( vitima, "sprint", false ) setControlState ( vitima, "walk", false ) setControlState ( vitima, "forwards", false ) toggleAllControls ( vitima, true ) end --- // Salvamento - Carregamento // --- addEventHandler("onPlayerLogin", root, function( _, acc ) CarregarLoginPlay ( acc ) end ) function CarregarLoginPlay ( conta ) if not isGuestAccount ( conta ) then if conta then local source = getAccountPlayer ( conta ) local AirNew_Tempo_Prisao = getAccountData ( conta, "AirNew_Tempo_Prisao" ) or 0 setElementData ( source, "AirNew_Tempo_Prisao", AirNew_Tempo_Prisao ) local AirNew_Preso = getAccountData ( conta, "AirNew_Preso" ) or "Não" setElementData ( source, "AirNew_Preso", AirNew_Preso ) end end end function ReiniciarScript ( res ) if res == getThisResource ( ) then for i, player in ipairs ( getElementsByType ( "player" ) ) do local acc = getPlayerAccount ( player ) if not isGuestAccount ( acc ) then CarregarLoginPlay ( acc ) end end end end addEventHandler ( "onResourceStart", getRootElement ( ), ReiniciarScript ) -- function SalvarLoginPlay ( conta ) if conta then local source = getAccountPlayer ( conta ) local AirNew_Tempo_Prisao = getElementData ( source, "AirNew_Tempo_Prisao" ) or 0 setAccountData ( conta, "AirNew_Tempo_Prisao", AirNew_Tempo_Prisao ) local AirNew_Preso = getElementData ( source, "AirNew_Preso" ) or "Não" setAccountData ( conta, "AirNew_Preso", AirNew_Preso ) end end function DesligarScript ( res ) if res == getThisResource ( ) then for i, player in ipairs ( getElementsByType ( "player" ) ) do local acc = getPlayerAccount ( player ) if not isGuestAccount ( acc ) then SalvarLoginPlay ( acc ) end end end end addEventHandler ( "onResourceStop", getRootElement ( ), DesligarScript ) function JogadorQuit ( quitType ) local acc = getPlayerAccount ( source ) if not isGuestAccount ( acc ) then if acc then SalvarLoginPlay ( acc ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), JogadorQuit ) function getPlayerFromID( id ) for _, player in next, getElementsByType("player") do if tonumber(id) and (getElementData(player, "ID") or -1) == tonumber(id) then return player end end return false end
  5. Meu painel p ta bugado, não consigo ativar resources, ativei o debug 3, e ta o seguinte..: Acess Denied @startResource
  6. Tentei colocar no script, porem sem sucesso, sera a posição errada que eu coloquei? Poderia colocar pra mim? Não sei mexer muito.
  7. Meu sistema de id é o Dnl, Data: ID, no caso eu troco pelo getPlayerFromPartialName.
  8. To com esse script de algemar, ele ta por niick, porem eu tentei por, pelo id trocando o (Nick) por (ID) Não funcionou alguem pode mim ajuda? --[[ ################################################ # # # Script Criado Por # # FACEBOOK.COM/AIRNEWSCR # # # # # ################################################ --]] ------------------------------------------------- InteriorDP = 6 DimensaoDP = 0 Cmd01 = "a" -- Algema Cmd02 = "d" -- Desalgema Cmd03 = "c" -- Retira Armas Grupo = "Policial" Distancia_Comandos = 7 Deixar_Preso = createMarker ( 1535.73486, -1672.03137, 13.38281 -1, "cylinder", 10, 255, 255, 255, 0 ) Local_Preso = createMarker ( 264.08435, 77.60955, 1001.03906 -1, "cylinder", 2.5, 255, 255, 255, 0 ) setElementInterior ( Local_Preso, InteriorDP ) setElementDimension ( Local_Preso, DimensaoDP ) function emarker ( marker, md ) if md then if marker == Deixar_Preso then if getElementData ( source, "ocupacao" ) == "Policial" then setElementData ( source, "AirNewSCR_PrisaoArea", "Sim" ) exports.Scripts_OnMarkerMsgs_:create ( source, "Aviso: Aperte F9 para Abrir / Fechar o Painel de Prender do DP" ) end end end end addEventHandler ( "onPlayerMarkerHit", getRootElement ( ), emarker ) function lmarker ( marker, md ) if md then if marker == Deixar_Preso then setElementData ( source, "AirNewSCR_PrisaoArea", "Não" ) exports.Scripts_OnMarkerMsgs_:delete(source) end end end addEventHandler ( "onPlayerMarkerLeave", getRootElement ( ), lmarker ) 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 function Algemar_Jogador ( thePlayer, _, nick ) if nick then if getPlayerFromPartialName ( nick ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo ) ) then local player_a_ser_algemado = getPlayerFromPartialName ( nick ) local nick_do_jogador = getPlayerName ( player_a_ser_algemado ) local nick_do_policial = getPlayerName ( thePlayer ) local jX, jY, jZ = getElementPosition (player_a_ser_algemado) local pX, pY, pZ = getElementPosition (thePlayer) local dist = getDistanceBetweenPoints3D ( pX, pY, pZ, jX, jY, jZ) if thePlayer == player_a_ser_algemado then return exports.Scripts_Textos:createNewDxMessage ( "Erro: Você não pode algemar você mesmo!", thePlayer, 255, 255, 255 ) end local Verificar = getElementData ( player_a_ser_algemado, "algemado" ) or false if Verificar == true then exports.Scripts_Textos:createNewDxMessage ( "Erro: Esse Jogador ja Esta Algemado!", thePlayer, 255, 255, 255 ) else if dist <= Distancia_Comandos then setElementData(player_a_ser_algemado,"algemado", true ) setElementFrozen( player_a_ser_algemado, true ) toggleControl(player_a_ser_algemado, "fire", false) setPedAnimation( player_a_ser_algemado, "GRAVEYARD", "mrnM_loop", -1, true, false, false, false) exports.Scripts_Textos:createNewDxMessage ( "Aviso: Você foi Algemado pelo Policial "..nick_do_policial, player_a_ser_algemado, 255, 255, 255 ) exports.Scripts_Textos:createNewDxMessage ( "Aviso: Você algemou o Jogador "..nick_do_jogador.." com Sucesso!", thePlayer, 255, 255, 255 ) else exports.Scripts_Textos:createNewDxMessage ( "Erro: Você esta Muito longe do Jogador! chegue mais Perto para poder Algema-lo!", thePlayer, 255, 255, 255 ) end end end end end end addCommandHandler( Cmd01, Algemar_Jogador) function Desalgemar_Jogador ( thePlayer, _, nick ) if nick then if getPlayerFromPartialName ( nick ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo) ) then local player_a_ser_desalgemado = getPlayerFromPartialName ( nick ) local nick_do_jogador = getPlayerName ( player_a_ser_desalgemado ) local nick_do_policial = getPlayerName ( thePlayer ) if thePlayer == player_a_ser_desalgemado then return exports.Scripts_Textos:createNewDxMessage ( "Erro: Você não pode desalgemar você mesmo!", thePlayer, 255, 255, 255 ) end local Verificar = getElementData ( player_a_ser_desalgemado, "algemado" ) or false if Verificar == false then exports.Scripts_Textos:createNewDxMessage ( "Erro: Esse Jogador não esta Algemado!", thePlayer, 255, 255, 255 ) else setElementData ( player_a_ser_desalgemado, "algemado", false ) setPedAnimation ( player_a_ser_desalgemado ) setElementFrozen ( player_a_ser_desalgemado, false ) toggleControl ( player_a_ser_desalgemado, "fire", true ) exports.Scripts_Textos:createNewDxMessage ( "Aviso: Você foi Desalgemado pelo Policial "..nick_do_policial, player_a_ser_desalgemado, 255, 255, 255 ) exports.Scripts_Textos:createNewDxMessage ( "Aviso: Você desalgemou o Jogador "..nick_do_jogador.." com Sucesso!", thePlayer, 255, 255, 255 ) end end end end end addCommandHandler( Cmd02, Desalgemar_Jogador) function Retirar_Armas ( source, cmd, pname ) if getElementData(source, "ocupacao" ) == "Policial" then local cliente = getPlayerFromPartialName(pname) if isElement(cliente) then if cliente == source then exports.Scripts_Dxmessages:outputDx(source, "Erro: Você não pode Retirar suas Proprias Armas!", "error") return end local cx,cy,cz = getElementPosition(cliente) local x,y,z = getElementPosition(source) local dist = getDistanceBetweenPoints3D(x,y,z,cx,cy,cz) if dist <= 7 then takeAllWeapons ( cliente ) exports.Scripts_Dxmessages:outputDx(source, "Aviso: Você removeu todas as Armas do Jogador #ffffff"..getPlayerName(cliente).." #ffffffcom Sucesso!", "success") exports.Scripts_Dxmessages:outputDx(cliente, "Aviso: O Policial #ffffff"..getPlayerName(source).."#ffffff Confiscou todas as suas Armas!", "warning") end else exports.Scripts_Dxmessages:outputDx(source, "Erro: O Jogador Não Foi Encontrado!", "error") end end end addCommandHandler ( Cmd03, Retirar_Armas ) function Verificar_Emprego_Atual ( ) for i, player in ipairs(getElementsByType("player")) do local acc = getPlayerAccount(player) if acc and not isGuestAccount(acc) then local job = getElementData(player,'ocupacao') local accName = getAccountName (acc) if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo ) ) then setElementData ( player, "ocupacao", "Policial" ) setElementData ( player, "AirNewSCR_Entrada_PortaoDP", "Sim" ) setElementData ( player, "AirNew_Perm_Prender", "Sim" ) else setElementData ( player, "ocupacao", "Criminoso" ) setElementData ( player, "AirNewSCR_Entrada_PortaoDP", "Não" ) setElementData ( player, "AirNew_Perm_Prender", "Não" ) end end end end setTimer ( Verificar_Emprego_Atual, 1500, 0 ) local Prisao_Blip = createBlip ( 1535.89856, -1672.66479, 13.38281 ) setElementVisibleTo ( Prisao_Blip, root, false ) function Nivel_de_Procurado ( source, int ) if int == 0 then setPlayerWantedLevel ( source, int ) else local wl = getPlayerWantedLevel ( source ) if wl + int <= 6 then setPlayerWantedLevel ( source, wl+int ) else setPlayerWantedLevel ( source, 6 ) end end end addEvent("AirNewSCR_Nivel_de_Procurado", true) addEventHandler("AirNewSCR_Nivel_de_Procurado", getRootElement ( ), Nivel_de_Procurado ) function Mensagens_Exports ( source, msg ) exports.Scripts_Textos:createNewDxMessage ( msg, source, 255, 255, 255 ) end addEvent ( "AirNewSCR_Mensagens_Exports", true) addEventHandler ( "AirNewSCR_Mensagens_Exports", getRootElement ( ), Mensagens_Exports ) function Enviar_Prisao_Servidor ( Jogador, Numero, Formato, Motivo ) outputChatBox ( "#58ACFAPolicia: O Policial #ffffff"..getPlayerName(source).." #58ACFAPrendeu o Jogador #ffffff"..Jogador.."!", root, 255, 255, 255, true ) outputChatBox ( "#58ACFAPolicia: Pelo tempo de "..Numero.." "..Formato..", Motivo: "..Motivo.."!", root, 255, 255, 255, true ) Jogador_Func = getPlayerFromName ( Jogador ) Estrelas_Preso = getPlayerWantedLevel ( Jogador_Func ) givePlayerMoney ( source, Estrelas_Preso*1000 ) if Formato == "Segundo(s)" then Multiplicador = 1 elseif Formato == "Minuto(s)" then Multiplicador = 60 elseif Formato == "Hora(s)" then Multiplicador = 3600 elseif Formato == "Dia(s)" then Multiplicador = 86400 end TempoPrisao = Numero*Multiplicador setElementData ( Jogador_Func, "AirNew_Tempo_Prisao", TempoPrisao ) setElementData ( Jogador_Func, "AirNew_Preso", "Sim" ) setPlayerWantedLevel ( Jogador_Func, 0 ) takeAllWeapons ( Jogador_Func ) setElementData ( Jogador_Func, "Policia:Captura", false ) setElementData ( Jogador_Func, "Player:Msg", "" ) showCursor ( Jogador_Func, false) setControlState ( Jogador_Func, "sprint", false) setControlState ( Jogador_Func, "walk", false) setControlState ( Jogador_Func, "forwards", false) toggleAllControls ( Jogador_Func, true ) triggerClientEvent ( source, "CancelTimeParaPrender:Time", source ) if getElementData ( Jogador_Func, "algemado" ) == true then setElementData ( Jogador_Func, "algemado", false ) setPedAnimation ( Jogador_Func ) setElementFrozen ( Jogador_Func, false ) toggleControl ( Jogador_Func, "fire", true ) end end addEvent( "AirNew_Enviar_Prisao", true ) addEventHandler( "AirNew_Enviar_Prisao", getRootElement(), Enviar_Prisao_Servidor ) function Capturar_Jogador ( source, wantedlevel, vitima ) local x, y, z = getElementPosition ( vitima ) if x < -518 and y < 0 then -- SF time = 4 end if x >= -518 and y < 510 then -- LS time = 2 end if x >= -518 and y >= 510 then -- LV time = 4 end setElementData ( source, "PoliceToPrision:Time", tonumber(time*60) ) setTimer ( triggerClientEvent, 10000, 1, source, "ShowTimeParaPrender:Time", source ) exports.Scripts_Textos:createNewDxMessage ( "Você foi Capturado pelo Policial "..getPlayerName(source), vitima, 255, 255, 255 ) exports.Scripts_Textos:createNewDxMessage ( "Você tem "..time.." Minutos para Levar o Jogador para a Prisão!", source, 255, 255, 255 ) toggleAllControls ( vitima, false ) setElementVisibleTo ( Prisao_Blip, source, true ) end addEvent("AirNewSCR_Capturar_Jogador", true) addEventHandler("AirNewSCR_Capturar_Jogador", getRootElement(), Capturar_Jogador ) function Teleportar_Capturado_Veiculo ( state, player , vehicle , seat ) if state == true then if seat and isElement ( vehicle ) then warpPedIntoVehicle ( player, vehicle, seat ) end else removePedFromVehicle ( player ) end end addEvent ( "AirNewSCR_TeleportarVeiculo", true ) addEventHandler ( "AirNewSCR_TeleportarVeiculo", getRootElement ( ), Teleportar_Capturado_Veiculo ) function Remover_Jogador_Veiculo ( player ) removePedFromVehicle ( player ) end addEvent ( "AirNewSCR_Remover_Jogador_Veiculo", true ) addEventHandler ( "AirNewSCR_Remover_Jogador_Veiculo", getRootElement ( ), Remover_Jogador_Veiculo ) function Teleportar_Capturado_Player ( source, type, value, x, y ,z) local Policial = getElementData ( source, "Policia:Captura" ) if isElement ( Policial ) and not isPedInVehicle ( source ) then if type == "INT" then setElementInterior ( source, value ) elseif type == "DIM" then setElementDimension ( source, value ) end setElementPosition ( source, x, y ,z ) end end addEvent ( "AirNewSCR_TeleportarPlayer", true ) addEventHandler ( "AirNewSCR_TeleportarPlayer", getRootElement ( ), Teleportar_Capturado_Player ) function Liberar_Capturado ( source ) for p, player in ipairs ( getElementsByType ( "player" ) ) do job = getElementData ( player,"ocupacao" ) or "Nenhum" capturado = getElementData ( player, "Policia:Captura" ) if job == "Criminoso" and isElement ( capturado ) then if capturado == source then Soltar_Fail_Captura ( source, player ) end end end end addEvent ( "AirNewSCR_FalharCapturaLiberar", true ) addEventHandler ( "AirNewSCR_FalharCapturaLiberar", getRootElement ( ), Liberar_Capturado ) function Soltar_Fail_Captura ( policial, vitima ) exports.Scripts_Textos:createNewDxMessage ( "O policial falhou e voce está solto novamnte, fuja",vitima, 255, 255, 255 ) exports.Scripts_Textos:createNewDxMessage ( "Voce falhou e o criminoso está solto novamente",policial, 255, 255, 255 ) setElementVisibleTo ( Prisao_Blip, policial, false ) setElementData ( vitima, "Policia:Captura", false ) setElementData ( vitima, "Player:Msg", "" ) showCursor ( vitima, false ) setControlState ( vitima, "sprint", false ) setControlState ( vitima, "walk", false ) setControlState ( vitima, "forwards", false ) toggleAllControls ( vitima, true ) end --- // Salvamento - Carregamento // --- addEventHandler("onPlayerLogin", root, function( _, acc ) CarregarLoginPlay ( acc ) end ) function CarregarLoginPlay ( conta ) if not isGuestAccount ( conta ) then if conta then local source = getAccountPlayer ( conta ) local AirNew_Tempo_Prisao = getAccountData ( conta, "AirNew_Tempo_Prisao" ) or 0 setElementData ( source, "AirNew_Tempo_Prisao", AirNew_Tempo_Prisao ) local AirNew_Preso = getAccountData ( conta, "AirNew_Preso" ) or "Não" setElementData ( source, "AirNew_Preso", AirNew_Preso ) end end end function ReiniciarScript ( res ) if res == getThisResource ( ) then for i, player in ipairs ( getElementsByType ( "player" ) ) do local acc = getPlayerAccount ( player ) if not isGuestAccount ( acc ) then CarregarLoginPlay ( acc ) end end end end addEventHandler ( "onResourceStart", getRootElement ( ), ReiniciarScript ) -- function SalvarLoginPlay ( conta ) if conta then local source = getAccountPlayer ( conta ) local AirNew_Tempo_Prisao = getElementData ( source, "AirNew_Tempo_Prisao" ) or 0 setAccountData ( conta, "AirNew_Tempo_Prisao", AirNew_Tempo_Prisao ) local AirNew_Preso = getElementData ( source, "AirNew_Preso" ) or "Não" setAccountData ( conta, "AirNew_Preso", AirNew_Preso ) end end function DesligarScript ( res ) if res == getThisResource ( ) then for i, player in ipairs ( getElementsByType ( "player" ) ) do local acc = getPlayerAccount ( player ) if not isGuestAccount ( acc ) then SalvarLoginPlay ( acc ) end end end end addEventHandler ( "onResourceStop", getRootElement ( ), DesligarScript ) function JogadorQuit ( quitType ) local acc = getPlayerAccount ( source ) if not isGuestAccount ( acc ) then if acc then SalvarLoginPlay ( acc ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), JogadorQuit )
  9. Ok, Desculpa, as não sei mexer muito com forum, tais opções eu nao sei fazer.
  10. Desculpa, fiquei um tempo fora, não pude ver. Muito Obrigado, Funcionou Perfeitamente, Feliz Natal ♥ :).
  11. Achei esse mod de ligar, desligar o motor do carro, trancar e acender a luz, porem quando eu aperto a o botão "J" que é para ligar o veiculo, faz o som de ligar, Porem nao liga o veiculo, alguem pode mim ajuda? SourceC --[[ --]] local types = { ["Automobile"] = true, ["Bike"] = true, ["Plane"] = true, ["Helicopter"] = true, ["Boat"] = true, ["Train"] = true, ["Monster Truck"] = true, ["Quad"] = true } local beltVehicles = { ["Automobile"] = true, ["Plane"] = true, ["Helicopter"] = true, ["Boat"] = true, ["Train"] = true, ["Monster Truck"] = true } function playSounds(sounds, bool) if not bool then bool = false end if sounds == "ov" then beltSound = playSound("files/".. sounds ..".mp3", bool) else playSound("files/".. sounds ..".mp3", bool) end end local beltVehicles = { ["Automobile"] = true, ["Plane"] = true, ["Helicopter"] = true, ["Boat"] = true, ["Train"] = true, ["Monster Truck"] = true } addEventHandler("onClientVehicleEnter", root, function(player) if player == localPlayer and beltVehicles[getVehicleType(getPedOccupiedVehicle(localPlayer))] then setElementData(localPlayer, "veh:ov", false) end end) addEventHandler("onClientVehicleExit", root, function(player) if player == localPlayer then if isElement(beltSound) then end end end) addEventHandler("onClientKey", root, function(key, pressed) if isChatBoxInputActive() or isConsoleActive() then return end if key == "x" and pressed and getPedOccupiedVehicle(localPlayer) and beltVehicles[getVehicleType(getPedOccupiedVehicle(localPlayer))] then if not getElementData(localPlayer, "veh:ov") then setElementData(localPlayer, "veh:ov", true) playSound("files/ovbe.mp3", false) outputChatBox("#1066E7[BVH - Veiculo]: #FFFFFFVocê colocou o cinto de segurança!", 255, 255, 255, true) else setElementData(localPlayer, "veh:ov", false) playSound("files/ovki.mp3", false) outputChatBox("#1066E7[BVH - Veiculo]: #FFFFFFVocê tirou o cinto de segurança!", 255, 255, 255, true) end end end) addEventHandler("onClientElementDestroy", getRootElement(), function () if getElementType(source) == "vehicle" and types[getVehicleType(source)] and getVehicleType(source) ~= "Bike" then setElementData(localPlayer, "veh:ov", false) end end) addEventHandler("onClientPlayerVehicleEnter", localPlayer, function(vehicle, seat) if source == localPlayer then local engine = vehicle:getData("veh:motor") local vehicle = getPedOccupiedVehicle(localPlayer) if getVehicleType(getPedOccupiedVehicle(localPlayer)) == "BMX" then setVehicleEngineState(vehicle, true) else if not engine then setVehicleEngineState(vehicle, false) else setVehicleEngineState(vehicle, true) end end end end) addEventHandler("onClientPlayerVehicleEnter", localPlayer, function(vehicle, seat) if source == localPlayer then local engine = vehicle:getData("veh:motor") local vehicle = getPedOccupiedVehicle(localPlayer) if getVehicleType(getPedOccupiedVehicle(localPlayer)) == "BMX" then setVehicleEngineState(vehicle, true) else if not engine then setVehicleEngineState(vehicle, false) else setVehicleEngineState(vehicle, true) end end if vehicle then outputChatBox("#1066E7[BVH - Veiculo]: #FFFFFFPara ligar o veículo, pressione #1066E7J", 255, 255, 255, true) outputChatBox("#1066E7[BVH - Veiculo]: #FFFFFFColoque o cinto de segurança, pressione #1066E7X", 255, 255, 255, true) end end end) function keyHandler(button,state) --Função Ligar motor if not (not guiGetInputEnabled() and not isMTAWindowActive() and not isCursorShowing()) then return end if isPedInVehicle(localPlayer) and getPedOccupiedVehicleSeat(localPlayer) == 0 then if not types[getVehicleType(getPedOccupiedVehicle(localPlayer))] then return end local veh = getPedOccupiedVehicle(localPlayer) if button == "j" and state then if isPedInVehicle(localPlayer) and getPedOccupiedVehicleSeat(localPlayer) == 0 then local state = getVehicleEngineState ( veh ) if not state then playSounds("lightswitch") vehTimer = setTimer(kocsiindit,1000,1) playSounds("starter") else kocsiindit() end end end end end addEventHandler("onClientKey",getRootElement(),keyHandler) function kocsiindit() local veh = getPedOccupiedVehicle(localPlayer) local state = getVehicleEngineState ( veh ) if not state then m = true if getElementHealth(veh) >= 321 then --Verifica se o carro ta quebrado se sim m = true else m = false outputChatBox("#1066E7[BVH - Veiculo]: #FFFFFFParece que está com o motor fundido chame por um Mecânico /mecanicos!", 255, 255, 255, true) end if getElementData(veh, "DNL:Combustivel") > 0 then --Verifica se o veiculo ta sem gasolina se sim m = true outputChatBox("#1066E7[BVH - Veiculo]: #FFFFFFVeiculo ligado!", 255, 255, 255, true) else m = false outputChatBox("#1066E7[BVH - Veiculo]: #FFFFFFO Veiculo está sem gasolina", 255, 255, 255, true) end else m = false outputChatBox("#1066E7[BVH - Veiculo]: #FFFFFFVeiculo desligado!", 255, 255, 255, true) end triggerServerEvent("vehicleStart",localPlayer,localPlayer,veh,m) end function processLockUnlock(vehicle) local locked = isVehicleLocked(vehicle) if isPedInVehicle(localPlayer) then playSounds("lockin") else playSounds("lockout") end if locked then triggerServerEvent("vehicleLock", localPlayer,localPlayer, vehicle, false) outputChatBox("#1066E7[BVH - Veiculo]: #FFFFFFVeiculo destrancado!", 255, 255, 255, true) else triggerServerEvent("vehicleLock", localPlayer,localPlayer, vehicle, true) outputChatBox("#1066E7[BVH - Veiculo]: #FFFFFFVeiculo trancado!", 255, 255, 255, true) end end function light() --Função do farol if klikkTimer then return end if isTimer(klikkTimerRun) then return end klikkTimer = true klikkTimerRun = setTimer(function() klikkTimer = false end,1000,1) local vehicle = getPedOccupiedVehicle(localPlayer) if isPedInVehicle(localPlayer) and getVehicleController(vehicle) == localPlayer and getVehicleType(vehicle) ~= "BMX" then local vehicle = getPedOccupiedVehicle ( localPlayer ) local vehLampaStat = tonumber(vehicle:getData("veh:light")) or 0 if vehLampaStat == 0 then playSounds("lightswitch") triggerServerEvent("setVehLightState",vehicle,vehicle,2, localPlayer) vehicle:setData("veh:light",1) vehicle:setData("veh >> light",true) else triggerServerEvent("setVehLightState",vehicle,vehicle,1, localPlayer) vehicle:setData("veh:light",0) playSounds("lightswitch") vehicle:setData("veh >> light",false) end end end bindKey("l", "down", light) local klikkTimer = false function setVehicleLockState() --Função trancar o carro if klikkTimer then return end if isTimer(klikkTimerRun) then return end klikkTimer = true klikkTimerRun = setTimer(function() klikkTimer = false end,1000,1) local vehicle = getPedOccupiedVehicle ( localPlayer ) if vehicle then processLockUnlock(vehicle) else local int2 = getElementInterior(localPlayer) local dim2 = getElementDimension(localPlayer) local mx,my,mz = getElementPosition(localPlayer) for k,v in ipairs(getElementsByType("vehicle")) do local x,y,z = getElementPosition(v) local int = getElementInterior(v) local dim = getElementDimension(v) local dist = getDistanceBetweenPoints3D(x,y,z,mx,my,mz) if dist <= 3 and int2 == int and dim2 == dim then processLockUnlock(v) return end end end end bindKey("k", "down", setVehicleLockState) --[[ --]] addEvent("vehicleStart",true) addEventHandler("vehicleStart",getRootElement(),function(player,veh,value) if not isElement(veh) and not value and not isPedInVehicle(player) then return end if getElementHealth(veh) > 300 then setVehicleEngineState(veh,value) veh:setData("veh:motor",value) end end) addEvent("vehicleLock",true) addEventHandler("vehicleLock",getRootElement(),function(player,veh,value) setVehicleLocked(veh, value) veh:setData("veh:status", value) end) function vehicleStartExit(thePlayer, seat, jacked) if isVehicleLocked(getPlayerOccupiedVehicle(thePlayer)) then outputChatBox("#1066E7[BVH - Veiculo]: #FFFFFF O seu veículo está fechado!", thePlayer, 255, 255, 255, true) cancelEvent() end if getElementData(thePlayer, "isFuelling") then cancelEvent() end end addEventHandler("onVehicleStartExit",getRootElement(),vehicleStartExit) addEvent("setVehLightState",true) addEventHandler("setVehLightState",root,function(veh,stat, playerSource) setVehicleOverrideLights(veh, stat) if playerSource then if (stat == 2) then outputChatBox("#1066E7[BVH - Veiculo]: #FFFFFF Farol ligado!", thePlayer, 255, 255, 255, true) else outputChatBox("#1066E7[BVH - Veiculo]: #FFFFFF Farol desligado!", thePlayer, 255, 255, 255, true) --outputChatBox("#1066E7[HiqueC - Veiculo]: #FFFFFF desligou a luz do veículo.", thePlayer, 255, 255, 255, true) end end end) -- Se o carro estiver quebrado o motor e desligado function onVehicleDamage(damage) if getElementHealth(source) - damage <= 319 then setElementHealth(source, 320) resetVehicleExplosionTime(source) setElementData(source, "veh:motor", false) setVehicleEngineState(source, false) end end addEventHandler("onVehicleDamage", root, onVehicleDamage) addEventHandler("onVehicleStartEnter", root, function(player, _, _) if source:getData("veh:status") and getVehicleType(source) == "BMX" then cancelEvent() end if isVehicleLocked(source) then outputChatBox("#1066E7[BVH - Veiculo]: #FFFFFF O veículo está fechado!", player, 255, 255, 255, true) cancelEvent() end end) function vehicleDamage ( loss ) local vehHealth = getElementHealth ( source ) if ( vehHealth < 300 ) then setElementHealth ( source, 300 ) setVehicleDamageProof ( source, true ) end end addEventHandler ( "onVehicleDamage", root, vehicleDamage ) SourceS
  12. Eu tentei, porem nao sei mecher muito com script nao funcionou Tem como ajudar?
  13. Boa Tarde rapaziada, to com esse script de systemlevel, um sistema de level, porem eu queria colocar ele para upar de level a cada 1 hora --[[ ################################################ # # # Script Criado Por # # FACEBOOK.COM/AIRNEWSCR # # # # # ################################################ --]] -------------------------------------------------------------------------------------------- exports [ "scoreboard" ]:addScoreboardColumn ( "Level") -------------------------------------------------------------------------------------------- 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 function DAR_XP_AIRNEWSCR ( source, cmd, pname, Quantidade ) if pname and tonumber(Quantidade) then local cliente = getPlayerFromPartialName(pname) if isElement(cliente) then if getElementData ( source, "Console_AirNewSCR" ) == "Sim" then setElementData ( cliente, "Level", Quantidade ) exports.Scripts_Dxmessages:outputDx(source, "Você Setou o Level do(a) Jogador(a) "..getPlayerName(cliente).."#ffffff para "..Quantidade.." com Sucesso!", "success") exports.Scripts_Dxmessages:outputDx(cliente, "O(A) Admin "..getPlayerName(source).."#ffffff Setou seu Level para "..Quantidade.." com Sucesso!", "success") end else exports.Scripts_Dxmessages:outputDx(source, "O Jogador Não Foi Encontrado", "error") end end end addCommandHandler ( "level", DAR_XP_AIRNEWSCR ) function convertS(s) if type(tonumber(s)) == "number" then milisegundo = s local horas_seg=3600 local hora = math.floor(milisegundo/horas_seg) local minuto = math.floor((milisegundo-(horas_seg*hora))/60) local segundo = math.floor((milisegundo-(horas_seg*hora)-(minuto*60))) local tudo = string.format("%02d:%02d:%02d",hora,minuto,segundo) local dia = math.floor(s/86400) return hora,minuto,segundo,tudo,dia else return 0,0,0,0,0 end end -------------------------------------------------------------------------------------------- function saveData(conta) if conta then local source = getAccountPlayer(conta) local level = getElementData(source,"Level") or 0 local exp = getElementData(source,"LSys:EXP") or 0 --local onlinetime = getElementData(source,"LSys:Online") or 0 --local mins = getElementData(source,"LSys:Mins") or 0 setAccountData (conta, "Level",level) setAccountData (conta, "LSys:EXP",exp) --setAccountData (conta, "LSys:Online",onlinetime) --setAccountData (conta, "LSys:Mins",mins) end end -------------------------------------------------------------------------------------------- function loaddata(conta) if not (isGuestAccount (conta)) then if (conta) then local source = getAccountPlayer(conta) local level = getAccountData(conta,"Level") if type(level) == "boolean" or level == nil then level = 0 end setElementData (source, "Level", tonumber(level)) setElementData (source, "LSys:EXP",tonumber(getAccountData(conta,"LSys:EXP")) or 0) --setElementData (source, "LSys:Online",tonumber(getAccountData(conta,"LSys:Online")) or 0) --setElementData (source, "LSys:Mins",tonumber(getAccountData(conta,"LSys:Mins")) or 0) end end end -------------------------------------------------------------------------------------------- function timecount ( ) for i, player in ipairs(getElementsByType("player")) do local acc = getPlayerAccount(player) if acc then if not isGuestAccount(acc) then if getElementData ( player, "AirNewSCR_LiberarXP" ) == "Sim" then setElementData ( player, "AirNewSCR_LiberarXP", "Não" ) local level = getElementData(player,"Level") or 0 if tonumber(level) == nil then level = 0 end local exp = getElementData(player,"LSys:EXP") or 0 if tonumber(exp) == nil then exp = 0 end --local onlinetime = getElementData(player,"LSys:Online") or 0 if tonumber(onlinetime) == nil then onlinetime = 0 end --local mins = getElementData(player,"LSys:Mins") or 0 if tonumber(mins) == nil then mins = 0 end --if tonumber(mins) == 600 then -- setElementData(player,"LSys:Mins",1) --end if tonumber(exp) >= 19 then setElementData(player,"LSys:EXP",0) setElementData(player,"Level",tonumber(level)+1) --outputChatBox ( "#ffffff[ #82FA58UP #ffffff] - Você Ganhou +1 de Experiência. (".. tonumber(exp)+1 .."/6)", player, 255, 255, 255, true ) outputChatBox ( "#ffffff[ #82FA58UP #ffffff] - Você Juntou 100 de Experiência e Ganhou +1 Level ("..tonumber(level)+1 ..")", player, 255, 255, 255, true ) playSoundFrontEnd ( player, 45 ) --DarSalario (player) -- Efetua os Pagamentos dos Jogadores else outputChatBox ( "#ffffff[ #82FA58UP #ffffff] - Você Ganhou +1 de Experiência. (".. tonumber(exp)+1 .."/20)", player, 255, 255, 255, true ) setElementData(player,"LSys:EXP",tonumber(exp)+1) --playSoundFrontEnd ( player, 44 ) end --if tonumber(mins) < 600 then -- setElementData(player,"LSys:Mins",tonumber(mins)+1) -- setElementData(player,"LSys:Online",tonumber(onlinetime)+1) --end end end end end end setTimer ( timecount, 1000, 0 ) --[[function DarSalario (player) local account = getPlayerAccount (player) local accname = getAccountName (account) local Jogador = getPlayerName (player) EmpregoAtual = getElementData ( player, "Emprego" ) sDesempregado = 300 sEntregadorDeJornal = 500 sPizzaBoy = 600 sMotoristaDeUber = 700 sMecanico = 800 sPetroleiro = 900 sMotoristaDeOnibus = 1000 sPilotoDeAviao = 1100 sPolicial = 10000 sSamu = 10000 SeguroDeVida = getElementData ( player, "Hospital:SeguroDeVida" ) MensalidadeSeguroDeVida = 150 outputChatBox ( "#F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #F96031Salário #F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", player, 255, 255, 255, true ) outputChatBox ( "#F96031» #BEE09ALogin da Conta #ffffff: #9ABDE0"..accname.." / #BEE09ANick #ffffff: #9ABDE0"..Jogador.."", player, 255, 255, 255, true ) if EmpregoAtual == "Entregador de Jornal" then givePlayerMoney ( player, sEntregadorDeJornal ) outputChatBox ( "#F96031» #BEE09AProfissão Atual #ffffff: #9ABDE0"..EmpregoAtual.."", player, 255, 255, 255, true ) outputChatBox ( "#F96031» #BEE09ASalário da Profissão #ffffff: #9ABDE0$"..sEntregadorDeJornal.."", player, 255, 255, 255, true ) elseif EmpregoAtual == "PizzaBoy" then givePlayerMoney ( player, sPizzaBoy ) outputChatBox ( "#F96031» #BEE09AProfissão Atual #ffffff: #9ABDE0"..EmpregoAtual.."", player, 255, 255, 255, true ) outputChatBox ( "#F96031» #BEE09ASalário da Profissão #ffffff: #9ABDE0$"..sPizzaBoy.."", player, 255, 255, 255, true ) elseif EmpregoAtual == "Motorista de Uber" then givePlayerMoney ( player, sMotoristaDeUber ) outputChatBox ( "#F96031» #BEE09AProfissão Atual #ffffff: #9ABDE0"..EmpregoAtual.."", player, 255, 255, 255, true ) outputChatBox ( "#F96031» #BEE09ASalário da Profissão #ffffff: #9ABDE0$"..sMotoristaDeUber.."", player, 255, 255, 255, true ) elseif EmpregoAtual == "Mecanico" then givePlayerMoney ( player, sMecanico ) outputChatBox ( "#F96031» #BEE09AProfissão Atual #ffffff: #9ABDE0"..EmpregoAtual.."", player, 255, 255, 255, true ) outputChatBox ( "#F96031» #BEE09ASalário da Profissão #ffffff: #9ABDE0$"..sMecanico.."", player, 255, 255, 255, true ) elseif EmpregoAtual == "Petroleiro" then givePlayerMoney ( player, sPetroleiro ) outputChatBox ( "#F96031» #BEE09AProfissão Atual #ffffff: #9ABDE0"..EmpregoAtual.."", player, 255, 255, 255, true ) outputChatBox ( "#F96031» #BEE09ASalário da Profissão #ffffff: #9ABDE0$"..sPetroleiro.."", player, 255, 255, 255, true ) elseif EmpregoAtual == "Motorista de Onibus" then givePlayerMoney ( player, sMotoristaDeOnibus ) outputChatBox ( "#F96031» #BEE09AProfissão Atual #ffffff: #9ABDE0"..EmpregoAtual.."", player, 255, 255, 255, true ) outputChatBox ( "#F96031» #BEE09ASalário da Profissão #ffffff: #9ABDE0$"..sMotoristaDeOnibus.."", player, 255, 255, 255, true ) elseif EmpregoAtual == "Piloto de Aviao" then givePlayerMoney ( player, sPilotoDeAviao ) outputChatBox ( "#F96031» #BEE09AProfissão Atual #ffffff: #9ABDE0"..EmpregoAtual.."", player, 255, 255, 255, true ) outputChatBox ( "#F96031» #BEE09ASalário da Profissão #ffffff: #9ABDE0$"..sPilotoDeAviao.."", player, 255, 255, 255, true ) elseif EmpregoAtual == "Policial" then givePlayerMoney ( player, sPolicial ) outputChatBox ( "#F96031» #BEE09AProfissão Atual #ffffff: #9ABDE0"..EmpregoAtual.."", player, 255, 255, 255, true ) outputChatBox ( "#F96031» #BEE09ASalário da Profissão #ffffff: #9ABDE0$"..sPolicial.."", player, 255, 255, 255, true ) elseif EmpregoAtual == false then givePlayerMoney ( player, sDesempregado ) outputChatBox ( "#F96031» #BEE09AProfissão Atual #ffffff: #9ABDE0Desempregado", player, 255, 255, 255, true ) outputChatBox ( "#F96031» #BEE09ASalário da Profissão #ffffff: #9ABDE0$"..sDesempregado.."", player, 255, 255, 255, true ) end if SeguroDeVida == true then takePlayerMoney ( player, MensalidadeSeguroDeVida ) outputChatBox ( "#F96031» #BEE09AMensalidade do Seguro de Vida #ffffff: #FA5858-$"..MensalidadeSeguroDeVida.."", player, 255, 255, 255, true ) end outputChatBox ( "#F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #F96031Salário #F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", player, 255, 255, 255, true ) end--]] --[[ -------------------------------------------------------------------------------------------- function meulevel(source) triggerClientEvent(source,"SHOW.WINDOW.LEVELSYS",source,true) end addCommandHandler("meulevel",meulevel) -------------------------------------------------------------------------------------------- function restart() for index, player in ipairs(getElementsByType("player")) do bindKey(player, "F2", "down", meulevel) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), restart) -------------------------------------------------------------------------------------------- function entrar() bindKey(source, "F2", "down", meulevel) end addEventHandler("onPlayerJoin", getRootElement(), entrar) -------------------------------------------------------------------------------------------- function fechar(player) for index, player in ipairs(getElementsByType("player")) do unbindKey(player, "F2", "down", meulevel) end end addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), fechar) --]] ------------------------------------------------------------------------------------------------------ addEventHandler("onPlayerLogin", root, function( _, acc ) setTimer(loaddata,1000,1,acc) end ) -------------------------------------------------------------------------------------------- function startScript ( res ) if res == getThisResource() then for i, player in ipairs(getElementsByType("player")) do local acc = getPlayerAccount(player) if not isGuestAccount(acc) then loaddata(acc) end end end end addEventHandler ( "onResourceStart", getRootElement(), startScript ) -------------------------------------------------------------------------------------------- function stopScript( res ) if res == getThisResource() then for i, player in ipairs(getElementsByType("player")) do local acc = getPlayerAccount(player) if not isGuestAccount(acc) then saveData(acc) end end end end addEventHandler ( "onResourceStop", getRootElement(), stopScript ) -------------------------------------------------------------------------------------------- function deslogar(acc) cancelEvent () end addEventHandler("onPlayerLogout",getRootElement(),deslogar) -------------------------------------------------------------------------------------------- function sair ( quitType ) local acc = getPlayerAccount(source) if not (isGuestAccount (acc)) then if acc then saveData(acc) end end end addEventHandler ( "onPlayerQuit", getRootElement(), sair ) --------------------------------------------------------------------------------------------
  14. Vou testar pelo debugscript
  15. Testei aqui, não funcionou tambem