Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/03/20 in all areas

  1. Obviamente vai da erro, você colocou 2 sistem level, o que eu fiz do 0, e o seu bugado. Bastava ler o que eu fiz, para ver que a cada 10 minutos iria da 1 EXP, e não disse nenhum momento pra junta os dois LOL
    2 points
  2. Bom, caso você queira compartilhar essa informação para diversos mods você usa o elementData, caso for usar as informações apenas no mesmo mod, recomendo usar tabela. Nesse seu sistema eu suponho que vá querer que seja compartilhado, então vou explicar como funciona o elementData. Você vai usar o setElementData para setar o valor no jogador. No primeiro argumento vai o elemento do jogador, no segundo o nome da key, e no terceiro o valor. Exemplo: setElementData(source, "Equipe", "Administrador") Agora o jogador está setado como "Administrador" na "Equipe" Para utilizar: getElementData(source, "Equipe") -- Exemplo de uso: outputChatBox(""..getElementData(source, "Equipe")) --Vai retornar: Administrador Não sei se deu para entender, mas qualquer dúvida só comentar aqui.
    1 point
  3. @Angelo Pereira por mais que pareça que o código que você criou está certo, ele ainda não está executando corretamente oque ele solicitou, tente interpretar o texto corretamente desta vez.
    1 point
  4. elementData é um "banco de dados" temporário. se caso queira criar um sistema com um salvamento mais seguro. pode usar setAccountData getAccountData claramente que existem outros "Bancos" como SQLite e MySQL
    1 point
  5. calma gente. sem extress.. esse codes da net estão tudo zuado. não vale apena dar continuidade com isso ( Pelo Amor de Deus ) e ainda pra ajudar o pessoal vem pedir/suporte com esse tipo de coisa que não vale a pena.. estou vendo que todos querem ajudar, mais infelizmente não vamos ter progresso com esse code. minha ideia é que... já que todos querem ajudar vamos criar um LevelSystem descente. se precisar pode conta com minha ajuda. vamos nos juntar e fazer um e POSTAR NA NET
    1 point
  6. Eu entendo, e concordo sobre dar dicas para melhorar, é algo valioso, mas, não estamos aqui pra causar discussão. Fiz de uma maneira funcional. -- Script only Server-Side-- function timecount ( ) for i, player in ipairs(getElementsByType("player")) do local acc = getPlayerAccount(player) if acc and not isGuestAccount(acc) then 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 --/> Se o Player Tiver 600 Segundos Então Faça : 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 ) setElementData(player,"LSys:Mins", 0) playSoundFrontEnd ( player, 44 ) end if tonumber(exp) >= 20 then --/> Se o Player Tiver 20 EXP Então faça : setElementData(player,"LSys:EXP",0) setElementData(player,"Level",tonumber(level)+1) outputChatBox ( "#ffffff[ #82FA58UP #ffffff] - Você Juntou 20 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 end if tonumber(mins) < 600 then --/> Se o Player Tiver Abaixo de 600 Segundos, Então Faça : setElementData(player,"LSys:Mins", tonumber(mins) + 10 ) --/>A Cada 10 Segundos Receberá + 10 s em seu Elemento Mins. setElementData(player,"LSys:Online",tonumber(onlinetime) + 10 ) end end end end setTimer ( timecount, 10000, 0 ) --/> 10 Segundos -- Calculo : -- 10000 s --> Adiciona +10s / em 60 Segundos Terá 1 Minuto = total de 60000 segundos / em 10 min atingirá 600000 onde receberá +1 EXP Aumentei o tempo como mencionei, para não fica disparando em 1 em 1s.
    1 point
  7. Você não deu apenas o exemplo, você está incitando ele a ele introduzir seu código incompleto ao servidor dele; e "falar mal" do código dos outros nem sempre é ruim, tendo vista que se o código está mal feito e pode melhorar, só sendo tolo pra querer lutar tanto pra não melhora-lo, só estou dando dicas de como podem obter melhores resultados, boa tarde pra você também, humildão.
    1 point
  8. O código que você fez não parece ter o resultado que ele espera pelos seguintes motivos; O código será executado a cada 10 minutos. Ou seja, se o jogador jogador X jogou por 9 minutos e acabou se desconectando, ao retornar ele terá que ficar online por 10 minutos pra obter a experiência onde no caso o correto seria ele jogar por apenas mais 1 minuto pra obter a experiência. Pra ganhar level ele terá que ficar conectado por uma 1h:10m, sem sair, já que a experiencia recebida não é salva e a tabela se inicia com 0 de experiência, e não por 1. Ou seja, mesmo que você já tenha jogado por 60 minutos e tenha 5/6 de experiência, caso você saia do jogo, ao voltar sua experiência será 0. Os dados que são inseridos na tabela table_experiencia nunca são removidos, e isso depois de um tempo vai começar a causar problemas de desempenho.
    1 point
  9. Basically as _Ace mentioned == true and == false is the wrong way of checking the vehicle. inFourD = createMarker (2019.76953125, 1007.0116577148, 9.7203125, "cylinder", 1, 255, 0, 0, 153) function inFourDragons (player, matchingDimension) if ( source == inFourD and getElementType(player) == "player" and isPedInVehicle(player) ) then outputChatBox("#D2691E[#FF7F50INFO#D2691E]#FFFFFF: No se permiten vehículos dentro.", player, 0, 0, 0, true) return; -- this return isn't completely necessary but it simply stops the rest of the code being read / checked unecessarily. elseif ( source == inFourD and getElementType(player) == "player" and not isPedInVehicle(player) ) then outputChatBox("#D2691E[#FF7F50INFO#D2691E]#FFFFFF: Ingresaste al casino '#DD0000Four Dragons#FFFFFF'.", player, 0, 0, 0, true) setElementInterior (player, 10) setElementPosition (player, 2016.9376220703, 1017.0843505859, 996.875 ) setElementRotation (player, 0, 0, 90) end end addEventHandler ("onMarkerHit", getRootElement(), inFourDragons) Try that code. EDIT: As for the invisible world, are your map objects set to interior 10?
    1 point
  10. line 1 change the Z position to 9.9203125 or make a bigger marker, if its base is below ground it wont trigger onfoot (tested) change line 4 and 6 to player in isPedOnVehicle, localPlayer is clientside only, also ==true is not needed
    1 point
  11. Não está no gibi a quantidade de problemas que esses mods do AirNew tem.
    1 point
  12. Your topics are alright, I don't think there's such a thing as "too many questions". You ask reasonable questions and give full detail in an articulated manner - and I also seen you come back to describe solutions when you find them. This is helpful for other users that will run into the same issue one year or so from now - allowing them to solve their own problems and others to learn from the answers you get. In my opinion other medium like e.g. Discord falls short in this respect, volatility is way too high there and language is often netspeak. You'll find solutions there as well (faster than here probably) but there's less of a benefit for the community from it. Hope I make sense.
    1 point
  13. Now I understand, this has changed my opnion very nice job... will put to downloading??
    1 point
  14. Lol, it's cRiTical damage I did not find useful
    1 point
  15. Criminal Damage is what? wanted Level ?
    1 point
  16. ================================================================== = Server name : Default MTA Server = Server IP address: = Server port : 22003 = = Log file : .. 1.4/server/mods/deathmatch/logs/server.log = Maximum players : 32 = HTTP port : 22005 = Voice Chat : Disabled = Bandwidth saving : Medium ================================================================== [2014-05-17 06:39:02] Resources: 191 loaded, 0 failed [2014-05-17 06:39:02] Starting resources... [2014-05-17 06:39:02] WARNING: admin/client/gui/admin_main.lua(Line 430) [Client] isPlayerDead is deprecated and may not work in future versions. Please replace with isPedDead before Tuesday. [2014-05-17 06:39:02] WARNING: admin/client/gui/admin_spectator.lua(Line 269) [Client] isPlayerDead is deprecated and may not work in future versions. Please replace with isPedDead before Tuesday. [2014-05-17 06:39:02] Some files in 'admin' use deprecated functions. [2014-05-17 06:39:02] Use the 'upgrade' command to perform a basic upgrade of resources. [2014-05-17 06:39:02] INFO: Admin added 492 missing rights [2014-05-17 06:39:03] WARNING: parachute/skydiving_cl.lua(Line 22) [Client] isPlayerDead is deprecated and may not work in future versions. Please replace with isPedDead before Tuesday. [2014-05-17 06:39:03] WARNING: parachute/openChute.lua(Line 35) [Client] isPlayerDead is deprecated and may not work in future versions. Please replace with isPedDead before Tuesday. [2014-05-17 06:39:03] Some files in 'parachute' use deprecated functions. [2014-05-17 06:39:03] Use the 'upgrade' command to perform a basic upgrade of resources. [2014-05-17 06:39:03] WARNING: freeroam/util.lua(Line 64) [Client] isPlayerDead is deprecated and may not work in future versions. Please replace with isPedDead before Tuesday. [2014-05-17 06:39:03] WARNING: freeroam/fr_client.lua(Line 550) [Client] isPlayerDead is deprecated and may not work in future versions. Please replace with isPedDead before Tuesday. [2014-05-17 06:39:03] Some files in 'freeroam' use deprecated functions. [2014-05-17 06:39:03] Use the 'upgrade' command to perform a basic upgrade of resources. [2014-05-17 06:39:03] Querying MTA master server... success! (Auto detected IP:179.216.244.150) [2014-05-17 06:39:03] Server started and is ready to accept connections! [2014-05-17 06:39:03] To stop the server, type 'shutdown' or press Ctrl-C [2014-05-17 06:39:03] Type 'help' for a list of commands. ERROS IN LOGS
    1 point
  17. Script in Team I not know to the "Protex" not group ACL local Timer = {} Bribe = {} xMain_ = function( ) for index,v in ipairs (getElementsByType("player")) do xWanted_(v) end end addEventHandler("onResourceStart", resourceRoot, xMain_); xWanted_ = function(v) if not isElement(v) then return end Timer[v] = setTimer( function(player) if isElement(player) then local team = getPlayerTeam(player) if ( team and getTeamName(team) == "Police" ) then return end local Wanted = getPlayerWantedLevel ( player ); local x,y,z = getElementPosition ( player ); local Name = getPlayerName ( player ); if ( Wanted >= 1 ) then if Bribe[player] and isElement(Bribe[player]) then return end Bribe[player] = createObject(1247,x,y,z); attachElements (Bribe[player],player,0,0,1.6) ; outputChatBox(" [ "..Name.." ] Have [ "..Wanted.." ] Wanted Level! ",v,255,0,0,true); elseif ( Wanted == 0 and Bribe[player] and isElement(Bribe[player]) ) then destroyElement(Bribe[player]); Bribe[player] = nil end end end ,5000,0,v); end xJoin_ = function ( ) xWanted_(source); end addEventHandler("onPlayerJoin",root,xJoin_); xWantedDestroy_ = function ( ) if Timer[source] and isTimer(Timer[source]) then killTimer(Timer[source]); Timer[source] = nil end; if Bribe[source] and isElement(Bribe[source]) then destroyElement(Bribe[source]); Bribe[source] = nil end end addEventHandler("onPlayerQuit",root,xWantedDestroy_);
    1 point
  18. Good job, looks very nice post download hud ?
    1 point
  19. É só verificar, no evento para apertar J, a durabilidade do carro...
    0 points
×
×
  • Create New...