-
Posts
106 -
Joined
-
Last visited
Everything posted by Giovany Mito
-
function veiculo1off (_,state, parameter) if painel == true then if ( state == "down" ) then if ( isCursorOnElement(283, 200, 43, 24)) then outputChatBox ("Saveiro G4 [OFF].") startVehMod () end end end end addEventHandler ("onClientClick", root, veiculo1off) function veiculo1on (_,state, parameter) if painel == true then if ( state == "down" ) then --283, 230, 43, 24 if ( isCursorOnElement(373, 200, 417, 225)) then outputChatBox ("Saveiro G4 [ON].") startVehMod (parameter) end end end end addEventHandler ("onClientClick", root, veiculo1on) Script client /\ Olá, Estou fazendo um script de desativar textura de veiculos skin etc... Mais estou com duvidas em como vou fazer para salvar na conta no player. Como deveria ser feito, peguei uma base do DNL de salvamento mais não conseguir fazer funcionar function saveCarMod (status) local acc = getPlayerAccount (client) if (not isGuestAccount (acc)) then setAccountData (acc, "vehMod.496", status) end end addEvent ("saveVehMod.496", true) addEventHandler ("saveVehMod.496", root, saveCarMod)
-
Entendi Vou tentar Fazer isso aqui então, Muito Obrigado
-
Entendi, com esse do malignos então no caso se eu quiser fazer um comando de rank tipo aparecer 5 team dentro de um DX por exemplo, da certo ? Tipo um em baixo do outro, 1 maior até o 5 maior
-
Entendi, obrigado pela ajuda. qual função ai no script faz que puxe o time com mais player ?
-
Parece que funcionou vou testar com mais players Obrigado
-
Seria mais o menos isso ? function TOPTeamCont() local teams = getElementsByType("team") for i,team in ipairs(teams) do local teamName = getTeamName(team) outputChatBox ("#1a6cef**#FFFFFF[#1a6cefFW-INFORMA#FFFFFF]#e0e0e0A Maior Equipe Online no Momento é a ".. teamName .." , #FFFFFF Com[#1a6cef" .. countPlayersInTeam ( teamName ) .. "#FFFFFF]#e0e0e0 Online",getRootElement(),255,255,255,true) end end setTimer(TOPTeamCont, 5000, 100)
-
olá, Então galera estou querendo fazer um script para a cada 20 minutos aparecer uma mensagem no chatbox no exemplo : - Servidor - O Time BALLAS é o maior online no momento com 10 Players Online Aparecer o time com mais players online a cada 20 minuto, como seria possivel
-
kkkkkkk, acho q não esta faltando nada, esta ? uma outra pergunta como faço para por mais de um nivel no msm comando ? if (getAccountData (getPlayerAccount (thePlayer), "Helper") == 1) then
-
Conseguir fazer o script mais acho q ficou muito grande kkkkkkkk function _setPlayerhlp(thePlayer, command, who, amount) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then if not tonumber ( amount ) then outputChatBox("ERRO:/sethlp <player> <nivel>", thePlayer, 255, 100, 100, true) return end local receiver = getPlayerFromName(who) if not (receiver) then outputChatBox("ERRO : Player OFF/Não Existe", thePlayer, 255, 100, 100, true) return end if not(tonumber ( amount ) <= 1) and not( tonumber ( amount ) >= 4 ) then setPlayerhlpp (receiver, amount) outputChatBox(" Você setou nivel "..amount.." de helper para o "..who:gsub('#%x%x%x%x%x%x', '').."!", thePlayer, 100, 255, 100, true) else outputChatBox("Você não pode setar esse nivel.", thePlayer, 255, 100, 100, true) end end end addCommandHandler("sethlp",_setPlayerhlp) function setPlayerhlpp(thePlayer, number) if ( getElementType ( thePlayer ) == "player" ) then setElementData(thePlayer,"levelhelper",tonumber(number)) end end addEventHandler("onPlayerLogin", root, function() local acc = getPlayerAccount(source) local helpset = (getAccountData(acc,"Helper") or 0) local helpset = getAccountData(acc, "Helper") or 0 setElementData(source, "levelhelper", tonumber(helpset)) end) addEventHandler("onPlayerQuit", root, function() local acc = getPlayerAccount(source) local helpset = getElementData(source, "levelhelper") or 0 setAccountData(acc, "Helper", tonumber(helpset)) end) addEventHandler("onResourceStart", resourceRoot, function() for _, player in pairs(getElementsByType("player")) do local acc = getPlayerAccount(source) local helpset = getAccountData(acc, "Helper") if helpset then setElementData(player, "levelhelper", tonumber(helpset)) end end end) function getPlayerhelp(thePlayer) local data = getElementData(thePlayer, "levelhelper") thePoints = tonumber(data) return thePoints end function takePlayerhelp(thePlayer, number) if ( getElementType ( thePlayer ) == "player" ) then setElementData(thePlayer,"levelhelper",getElementData(thePlayer, "levelhelper")-tonumber(number)) end end
-
Ja Descobrir era a função de baixo que resetava quando o player dava respawn Obrigado
-
Agora entendi, no caso se meu nick for Giovany se eu digitar só gio ele ja busca o nome mais proximo disso no caso né ? tenho um script assim
-
E porque sera ele essa função resetou o level do player ? olhei no internal e ficou 0 o level
-
Olá, Então galera estou usando essa função para add coluna de level no scoreboard function setScoreLevel (thePlayer) local Level = exports.exp_system:getPlayerLevel ( thePlayer ) if Level == false then setElementData ( source, "Level", "0" ) else setElementData ( source, "Level", Level) end end addEventHandler ( "onPlayerSpawn", getRootElement(),setScoreLevel) Estava funcionando normalmente, mais ai hoje atarde começei a fazer um script de nascer no hospital apos morrer e comecei mexer no onplayerspawn de outro script, então aconteceu que zerou o level do player, e agora vem um erro 2 exports : call to non-running server resource (ex_system) [string "?"]
-
Oquer seria essa ultima função no EDIT ?
-
Entendi, Vou tentar desenrolar aqui, obrigado
-
Entendi, mais ai como eu faria para aquele nivel usar um comando tal, no caso eu estou usando assim if isObjectInACLGroup("user." .. accountname, aclGetGroup("REPORTERLIDER")) then
-
funciona assim na hierarquia. LEVEL 4 - LIDER = COMANDOS : /setreporter /hq /ir /tr /chatlider LEVEL 3 - SUB LIDER /ir /tr /chatsub LEVEL 2 - REPORTER FIXO /hq /noticias /chatfixo LEVEL 1 - REPORTER TEMPORARIO /hq /chattemp ai cada level tem um tipo de comando, para eu fazer essa setagem eu tenho que criar no caso 4 grupos na acl, os grupo : REPORTERLIDER, REPORTERSUB, REPORTERFIXO, REPORTERTEMP, no caso, /setreporterlider /setreportersub e assim por indiante... ai fica aquele monte de acl, oque queria saber se tem como com apenas um grupo colocar level ai faço setagem assim /setreporter NIVEL NICK exemplo: /setreporter 4 giio. ai nos comandos não sei tambem ia por para só aquele level do grupo pudsse usar
-
Olá, Então, eu to fazendo uma organização no meu servidor de REPORTER, e no caso tem uma hierarquia tipo. LEVEL 4 - LIDER LEVEL 3 - SUB LIDER LEVEL 2 - REPORTER FIXO LEVEL 1 - REPORTER TEMPORARIO Eu no começo do sistema fiz 4 grupo na acl, mais assim fica muito grupo se for fazer em todas as organização do servidor, então eu tava pensando tem como eu fazer esses nivel dentro da acl ?
-
Olá, Então galera no meu script quando o player loga no servidor ele nasce na base do team dele, ai quando ele morre ele nasce na base do team denovo, eu queria uma dica de como faço para ele quando morrer nascer em um hospital, no caso cada team nasce em um hospital diferente quando morrer function spawner() setTimer(function(source) local teamCoords = coords[getTeamName(getPlayerTeam(source))] local rndN = 0 if teamCoords then rndN = math.random(1,#teamCoords) setElementPosition(source, teamCoords[rndN][1], teamCoords[rndN][2], teamCoords[rndN][3]) else rndN = math.random(1,#novato) setElementPosition(source, novato[rndN][1], novato[rndN][2], novato[rndN][3]) end end,1000,1,source) end addEventHandler("onPlayerSpawn",getRootElement(),spawner) ------ ------ function getSpawnSede (thePlayer) if (thePlayer) then if (getPlayerTeam(thePlayer)) then if (coords[getTeamName(getPlayerTeam(thePlayer))][1]) then return coords[getTeamName(getPlayerTeam(thePlayer))][1], coords[getTeamName(getPlayerTeam(thePlayer))][2], coords[getTeamName(getPlayerTeam(thePlayer))][3] end end end end setOcclusionsEnabled( false )
-
Entendi, vou tentar testar com alguem jaja
-
function getPlayer(player, cmd, id) if tonumber(id) then local mx, my, mz = getElementPosition(player) local player2 = getPlayerFromID ( tonumber(id) ) if not player2 or not isElement(player2) then return outputChatBox( "Player Offline", player ) end local trplayername = getPlayerName(player):gsub("#%x%x%x%x%x%x","") local rand = math.random(1, 5) setElementPosition(player2, mx+rand, my+rand, mz + 1) for i, p in ipairs(getElementsByType("player")) do local xp, yp, zp = getElementPosition ( p ) if getDistanceBetweenPoints3D ( mx, my, mz, xp, yp, zp ) <= 50 then outputChatBox ( "#c9c9c9[#1a6cefFW-COMANDO#c9c9c9]O #1a6cef".. trplayername .."#c9c9c9 Puxou o #1a6cef".. tostring(id), p, 255, 0, 0, true ); end end end end addCommandHandler("tr", getPlayer) Esse é o comando onde uso para puxar o player usando o id em vez do nome function getIDFromPlayer(player) if player then local theid players = getElementsByType("player") for id,p in ipairs(players) do if player == p then theid = i end end return theid else return false end end function getPlayerFromID(theID) if theID then theID = tonumber(theID) local theplayer players = getElementsByType("player") for id,p in ipairs(players) do if theID == id then theplayer = p end end return theplayer else return false end end Esse é para pegar o id do player
-
Olá, Estou com problemas com o sistema de id player. No meu comando eu uso para puxar um player usando o id dele e não o nick, mais ai que esta o problema o player nao tem um id fixo. no scoreboard tem um id fixo mais quando puxo não tem. no score board marca assim exemplo : ID 1 Giio ID 2 Fulano se o ID 1 Desloga automatico o 2 fulano vira o id 1 mais você não ve, no scoreboard continua ID 2, oque seria ??
-
Entendi... Li sim obrigado
-
Agora funcionou, eu ia mudar o o account para accountadd mais achei que não podia por causa q tinha o local accountAdded = addAccount(tostring(username),tostring(password)) Mais acho que entendi agora, teve que usar accountadd pois o if then estava usando né, acho que isso que entendi, por isso falou sobre o if account then e eu não achei kkk menos um problema que começarei a prestar mais atenção obrigado
-
function registerPlayer(username,password,email) if username == "" then return triggerClientEvent(source,"login_text",source,"error","Digite o nome de usuário!") end if password == "" then return triggerClientEvent(source,"login_text",source,"error","Digite sua senha!") end if email == "" then return triggerClientEvent(source,"login_text",source,"error","Digite seu email!") end local account = getAccount (username,password) if account then return triggerClientEvent(source,"login_text",source,"error","Nome de usuário, senha ou email está errada!") end local accountAdded = addAccount(tostring(username),tostring(password)) if not accountAdded then return triggerClientEvent(source,"login_text",source,"error","Erro! Tente novamente com um novo nome de usuário ou senha!") end setAccountData(account, "e-mail", tostring(email)) outputChatBox ("[User: #FFFFFF" .. username .. " #FF0000| Senha: #FFFFFF" .. password .. " | Email: " .. email .. "#00FF00 ]",source,255,255,255,true) triggerClientEvent(source,"onRegister",source) triggerClientEvent(source,"login_text",source,"sucess","A conta foi criada com sucesso!") end addEvent("onRequestRegister",true) addEventHandler("onRequestRegister",getRootElement(),registerPlayer) Ai esta, Me desculpe por minha burrice mais sou novo ainda kkkkk
