Jump to content

IP NO JOIN THE SERVER


Recommended Posts

10 minutes ago, DNL291 said:

@LegendMercy poderia mostrar qual texto do IP mostra quando ele entra? se puder, mostre um print com essa mensagem.

https://imgur.com/a/xSUfpg1

13 minutes ago, DNL291 said:

@LegendMercy poderia mostrar qual texto do IP mostra quando ele entra? se puder, mostre um print com essa mensagem.

Tampei o IP por motivos de privacidade do jogador. se bem que ta aparecendo pra todo mundo que esta no server, mas enfim ..se poder me ajudar agradeço MTTTTTTTTTTTTTT

Link to comment
  • Moderators

Provavelmente se trata de um script do gamemode. Tente encontrar esse código nos seus resources.

Você pode usar uma ferramenta de busca com palavras-chave (ex: "is connecting" ou o evento "onPlayerConnect"/"onPlayerJoin").

Edited by DNL291
  • Like 1
Link to comment
3 minutes ago, DNL291 said:

Provavelmente se trata de um script do gamemode. Tente encontrar esse código nos seus resources.

Você pode usar uma ferramenta de busca com palavras-chave (ex: "is connecting" ou o evento "onPlayerConnect"/"onPlayerJoin").

Nas resources já procurei, mas achei numa pasta chamada linguagens no gamemode que não esta compilada segue o código,

 

 <connect                        string="* %s #FF6464is connecting [#EBDDB2%s#FF6464]" />

    <disconnect_save                string="* %s #FF6464has left the game [%s]%s [Saved]" />
    <disconnect                     string="* %s #FF6464has left the game [%s]%s" />

Link to comment
  • Other Languages Moderators
1 minute ago, LegendMercy said:

Nas resources já procurei, mas achei numa pasta chamada linguagens no gamemode que não esta compilada segue o código,

 

 <connect                        string="* %s #FF6464is connecting [#EBDDB2%s#FF6464]" />

    <disconnect_save                string="* %s #FF6464has left the game [%s]%s [Saved]" />
    <disconnect                     string="* %s #FF6464has left the game [%s]%s" />

É um arquivo XML?

Edited by Lord Henry
Link to comment
  • Other Languages Moderators

Bom, apague a parte dos colchetes no connect. O resto mantenha igual.

<connect                        string="* %s #FF6464is connecting" />
<disconnect_save                string="* %s #FF6464has left the game [%s]%s [Saved]" />
<disconnect                     string="* %s #FF6464has left the game [%s]%s" />

 

Link to comment
7 minutes ago, Lord Henry said:

Bom, apague a parte dos colchetes no connect. O resto mantenha igual.


<connect                        string="* %s #FF6464is connecting" />
<disconnect_save                string="* %s #FF6464has left the game [%s]%s [Saved]" />
<disconnect                     string="* %s #FF6464has left the game [%s]%s" />

 

Isso resolveu o problema, mas continuou aparecendo no console isso é normal né?

Link to comment
  • Other Languages Moderators
2 minutes ago, LegendMercy said:

Isso resolveu o problema, mas continuou aparecendo no console isso é normal né?

Depende.
No Console do servidor (Prompt de Comando) é normal sim, e isso não tem como tirar. Inclusive não tem problema de aparecer lá pois somente quem tem acesso ao Console pode ver.
Mas se for no Console do jogador (F8) dai não era pra aparecer.

Edited by Lord Henry
Link to comment
3 minutes ago, Lord Henry said:

Depende.
No Console do servidor (Prompt de Comando) é normal sim, e isso não tem como tirar.
Mas se for no Console do jogador (F8) dai não era pra aparecer.

Sim é no console da host no game ta normal, ah outra coisa mano, é a ultima juro, já to sendo mt chato kkkkkk, aproveitando novamente o tópico, bom eu vejo alguns servidores de tactics usando um certo painel , só que é MUITO dificil de encontrar na net tipo mt dificil mesmo, nesse painel de ( adm ) claro, tem um AIMBOT + esp box de onde esta todos os jogadores do servidor, como o tactics é gamemode de treino ( mapas pequenos ) gostaria de saber se você sabe que script é esse se quiser te mando print de como é!

Link to comment
  • Other Languages Moderators
1 minute ago, LegendMercy said:

Sim é no console da host no game ta normal, ah outra coisa mano, é a ultima juro, já to sendo mt chato kkkkkk, aproveitando novamente o tópico, bom eu vejo alguns servidores de tactics usando um certo painel , só que é MUITO dificil de encontrar na net tipo mt dificil mesmo, nesse painel de ( adm ) claro, tem um AIMBOT + esp box de onde esta todos os jogadores do servidor, como o tactics é gamemode de treino ( mapas pequenos ) gostaria de saber se você sabe que script é esse se quiser te mando print de como é!

Nunca ouvi falar xD.
Relaxa, não estou me irritando com tantas perguntas. Acho mais válido do que ficar criando mil tópicos depois.

Link to comment
  • Other Languages Moderators
3 minutes ago, LegendMercy said:

https://imgur.com/a/LKeEByB da uma olhada na print isso é um painel , ( adm ) se poder me ajudar achar isto seria ótimo KK pra mim zoar com meus úsuarios 

Ah... uso de hacks...
Não sei sobre hacks. O máximo que uso no meu server é Superman para os Staffs.

Tem também estes Glitches que são permitidos no MTA e são fáceis de se fazer usando SetGlitchEnabled

Edited by Lord Henry
Link to comment
4 minutes ago, Lord Henry said:

Ah... uso de hacks...
Não sei sobre hacks. O máximo que uso no meu server é Superman para os Staffs.

É tipo 1 '' hack '' mas é um script que permite você ativar e desativar isso para os admins, já que não conhece, você podeira me informar se eu consigo criar um ''blip'' somente para os administradores que quando usarem o comando por exemplo /adm mostrar todos os jogadores no GPS? e no mapa tipo o freeroam 

Edited by LegendMercy
Link to comment
  • Other Languages Moderators

A propósito, fiz um script para mostrar pra você como fazer o rank de jogadores por Kill/Death. Você usa /rank para mostrar a lista com todas as contas dos jogadores e seus respectivos Kills e Deaths.
No server.lua, já criei uma função que salva esses dados quando alguém mata/morre.
server.lua

function recebeKills ()
	local data = getAccounts ()
	local accTable = {}
	local killsTable = {}
	local deathsTable = {}
	local kill = 0
	local death = 0
	if not data[1] then
		triggerClientEvent (client, "showRank", client)
		return
	end
	for i, acc in ipairs (data) do
		table.insert (accTable, getAccountName (data[i]))
		if not getAccountData (data[i], "kills") then
			table.insert (killsTable, "0")
		else
			table.insert (killsTable, tostring (getAccountData (data[i], "kills")))
		end
		if not getAccountData (data[i], "deaths") then
			table.insert (deathsTable, "0")
		else
			table.insert (deathsTable, tostring (getAccountData (data[i], "deaths")))
		end
	end
	triggerClientEvent (client, "showRank", client, accTable, killsTable, deathsTable)
end
addEvent ("getRank", true)
addEventHandler ("getRank", getRootElement(), recebeKills)

function salvaKills (ammo, killer, weapon, bodypart, stealth)
	if not isGuestAccount (getPlayerAccount(source)) then
		local deaths = getAccountData (getPlayerAccount(source), "deaths")
		if deaths then
			setAccountData (getPlayerAccount(source), "deaths", deaths + 1)
		else
			setAccountData (getPlayerAccount(source), "deaths", 1)
		end
	end
	if killer and killer ~= source then
		if getElementType (killer) == "player" then
			if not isGuestAccount (getPlayerAccount(killer)) then
				local kills = getAccountData (getPlayerAccount(killer), "kills")
				if kills then
					setAccountData (getPlayerAccount(killer), "kills", kills + 1)
				else
					setAccountData (getPlayerAccount(killer), "kills", 1)
				end
			end
		elseif getElementType (killer) == "vehicle" then
			killer = getVehicleController (killer)
			if killer then
				if not isGuestAccount (getPlayerAccount(killer)) then
					local kills = getAccountData (getPlayerAccount(killer), "kills")
					if kills then
						setAccountData (getPlayerAccount(killer), "kills", kills + 1)
					else
						setAccountData (getPlayerAccount(killer), "kills", 1)
					end
				end
			end
		end
	end
end
addEventHandler ("onPlayerWasted", getRootElement(), salvaKills)

client.lua

scoreGrid = guiCreateGridList (0.4, 0.3, 0.2, 0.4, true)
guiGridListAddColumn (scoreGrid, "Account", 0.5)
guiGridListAddColumn (scoreGrid, "Kills", 0.19)
guiGridListAddColumn (scoreGrid, "Deaths", 0.19)
guiSetAlpha (scoreGrid, 0.8)
guiSetVisible (scoreGrid, false)
closeGrid = guiCreateButton (0.6, 0.3, 0.018, 0.03, "X", true)
guiSetAlpha (closeGrid, 0.8)
guiSetVisible (closeGrid, false)

function scoreInfo (accounts, kills, deaths)
	guiSetVisible (scoreGrid, true)
	guiSetVisible (closeGrid, true)
	showCursor (true)
	if accounts then
		for i, v in ipairs (accounts) do
			guiGridListAddRow (scoreGrid, accounts[i], kills[i], deaths[i])
		end
	end
end
addEvent ("showRank", true)
addEventHandler ("showRank", getRootElement(), scoreInfo)

function clickOptions (button, state, absoluteX, absoluteY)
	if button == "left" then
		if source == closeGrid then
			guiSetVisible (scoreGrid, false)
			guiSetVisible (closeGrid, false)
			showCursor (false)
			guiGridListClear (scoreGrid)
		end
	end
end
addEventHandler ("onClientGUIClick", getRootElement(), clickOptions)

function sendScores ()
	triggerServerEvent ("getRank", localPlayer)
end
addCommandHandler ("rank", sendScores)

Espero que ajude, fique a vontade para editar.

Edited by Lord Henry
Link to comment
3 minutes ago, Lord Henry said:

A propósito, fiz um script para mostrar pra você como fazer o rank de jogadores por Kill/Death. Você usa /rank para mostrar a lista com todas as contas dos jogadores e seus respectivos Kills e Deaths.
No server.lua, já criei uma função que salva esses dados quando alguém mata/morre.
server.lua


function recebeKills ()
	local data = getAccounts ()
	local accTable = {}
	local killsTable = {}
	local deathsTable = {}
	local kill = 0
	local death = 0
	if not data[1] then
		triggerClientEvent (client, "showRank", client)
		return
	end
	for i, acc in ipairs (data) do
		table.insert (accTable, getAccountName (data[i]))
		if not getAccountData (data[i], "kills") then
			table.insert (killsTable, "0")
		else
			table.insert (killsTable, tostring (getAccountData (data[i], "kills")))
		end
		if not getAccountData (data[i], "deaths") then
			table.insert (deathsTable, "0")
		else
			table.insert (deathsTable, tostring (getAccountData (data[i], "deaths")))
		end
	end
	triggerClientEvent (client, "showRank", client, accTable, killsTable, deathsTable)
end
addEvent ("getRank", true)
addEventHandler ("getRank", getRootElement(), recebeKills)

function salvaKills (ammo, killer, weapon, bodypart, stealth)
	if not isGuestAccount (getPlayerAccount(source)) then
		local deaths = getAccountData (getPlayerAccount(source), "deaths")
		if deaths then
			setAccountData (getPlayerAccount(source), "deaths", deaths + 1)
		else
			setAccountData (getPlayerAccount(source), "deaths", 1)
		end
	end
	if killer and killer ~= source then
		if getElementType (killer) == "player" then
			if not isGuestAccount (getPlayerAccount(killer)) then
				local kills = getAccountData (getPlayerAccount(killer), "kills")
				if kills then
					setAccountData (getPlayerAccount(killer), "kills", kills + 1)
				else
					setAccountData (getPlayerAccount(killer), "kills", 1)
				end
			end
		elseif getElementType (killer) == "vehicle" then
			killer = getVehicleController (killer)
			if killer then
				if not isGuestAccount (getPlayerAccount(killer)) then
					local kills = getAccountData (getPlayerAccount(killer), "kills")
					if kills then
						setAccountData (getPlayerAccount(killer), "kills", kills + 1)
					else
						setAccountData (getPlayerAccount(killer), "kills", 1)
					end
				end
			end
		end
	end
end
addEventHandler ("onPlayerWasted", getRootElement(), salvaKills)

client.lua


scoreGrid = guiCreateGridList (0.4, 0.3, 0.2, 0.4, true)
guiGridListAddColumn (scoreGrid, "Account", 0.5)
guiGridListAddColumn (scoreGrid, "Kills", 0.19)
guiGridListAddColumn (scoreGrid, "Deaths", 0.19)
guiSetAlpha (scoreGrid, 0.8)
guiSetVisible (scoreGrid, false)
closeGrid = guiCreateButton (0.6, 0.3, 0.018, 0.03, "X", true)
guiSetAlpha (closeGrid, 0.8)
guiSetVisible (closeGrid, false)

function scoreInfo (accounts, kills, deaths)
	guiSetVisible (scoreGrid, true)
	guiSetVisible (closeGrid, true)
	showCursor (true)
	if accounts then
		for i, v in ipairs (accounts) do
			guiGridListAddRow (scoreGrid, accounts[i], kills[i], deaths[i])
		end
	end
end
addEvent ("showRank", true)
addEventHandler ("showRank", getRootElement(), scoreInfo)

function clickOptions (button, state, absoluteX, absoluteY)
	if button == "left" then
		if source == closeGrid then
			guiSetVisible (scoreGrid, false)
			guiSetVisible (closeGrid, false)
			showCursor (false)
			guiGridListClear (scoreGrid)
		end
	end
end
addEventHandler ("onClientGUIClick", getRootElement(), clickOptions)

function sendScores ()
	triggerServerEvent ("getRank", localPlayer)
end
addCommandHandler ("rank", sendScores)

Espero que ajude, fique a vontade para editar.

Caraca mano tu é foda, e agora eu tenho que fazer a parte do designer né? no gui editor

Link to comment
  • Other Languages Moderators
3 minutes ago, LegendMercy said:

Blz, ent já esta funcionando né, por exemplo, se eu resetar a internal, vai zerar tudo né?

Se tu resetar a internal, todo mundo perde sua conta e seus dados! '-'

Mas sim, o script já está funcionando tranquilamente.

E se quiser, ta ae o meta.xml dele:

<meta>
	<info author="LordHenry" version="1.0.1" name="Ranking Kills/Death" type="script" description="When you use /rank command, you can see everyone's kill/death." />
	<script src="server.lua" type="server" />
	<script src="client.lua" type="client" />
</meta>

 

Edited by Lord Henry
Link to comment
3 minutes ago, Lord Henry said:

Se tu resetar a internal, todo mundo perde sua conta e seus dados! '-'

Mas sim, o script já está funcionando tranquilamente.

Teria como adicionar uma função do lado ali mostrando o kdr da pessoa? vou modificar a gui pra ficar maior etc

Link to comment
4 minutes ago, Lord Henry said:

Tem sim. Pera ae.

Outra coisa mano é, eu percebi que com comando pode bugar a lista duplicando os valores, não é melhor trocar o comando por uma tecla? pra apertar pra abrir exemplo F7 mas eu não sei como modificar kk

Link to comment
  • Other Languages Moderators
7 minutes ago, LegendMercy said:

Outra coisa mano é, eu percebi que com comando pode bugar a lista duplicando os valores, não é melhor trocar o comando por uma tecla? pra apertar pra abrir exemplo F7 mas eu não sei como modificar kk

Se refere a usar o comando /rank duas vezes seguidas?

Link to comment
  • Other Languages Moderators

Pronto, adicionado o Ratio (Kills dividido pelas Deaths) e corrigido bug de duplicar os dados ao usar o comando várias vezes.

server.lua

function recebeKills ()
	local data = getAccounts ()
	local accTable = {}
	local killsTable = {}
	local deathsTable = {}
	local killDeath = {}
	local kill = 0
	local death = 0
	if not data[1] then
		triggerClientEvent (client, "showScores", client)
		return
	end
	for i, acc in ipairs (data) do
		table.insert (accTable, getAccountName (data[i]))
		if not getAccountData (data[i], "kills") then
			table.insert (killsTable, "0")
			kill = 0
		else
			table.insert (killsTable, tostring (getAccountData (data[i], "kills")))
			kill = tonumber (getAccountData (data[i], "kills"))
		end
		if not getAccountData (data[i], "deaths") then
			table.insert (deathsTable, "0")
			death = 0
		else
			table.insert (deathsTable, tostring (getAccountData (data[i], "deaths")))
			death = tonumber (getAccountData (data[i], "deaths"))
		end
		if death == 0 and kill == 0 then
			table.insert (killDeath, 0)
		else
			table.insert (killDeath, kill / death)
		end
	end
	triggerClientEvent (client, "showRank", client, accTable, killsTable, deathsTable, killDeath)
end
addEvent ("getRank", true)
addEventHandler ("getRank", getRootElement(), recebeKills)

function salvaKills (ammo, killer, weapon, bodypart, stealth)
	if not isGuestAccount (getPlayerAccount(source)) then
		local deaths = getAccountData (getPlayerAccount(source), "deaths")
		if deaths then
			setAccountData (getPlayerAccount(source), "deaths", deaths + 1)
		else
			setAccountData (getPlayerAccount(source), "deaths", 1)
		end
	end
	if killer and killer ~= source then
		if getElementType (killer) == "player" then
			if not isGuestAccount (getPlayerAccount(killer)) then
				local kills = getAccountData (getPlayerAccount(killer), "kills")
				if kills then
					setAccountData (getPlayerAccount(killer), "kills", kills + 1)
				else
					setAccountData (getPlayerAccount(killer), "kills", 1)
				end
			end
		elseif getElementType (killer) == "vehicle" then
			killer = getVehicleController (killer)
			if killer then
				if not isGuestAccount (getPlayerAccount(killer)) then
					local kills = getAccountData (getPlayerAccount(killer), "kills")
					if kills then
						setAccountData (getPlayerAccount(killer), "kills", kills + 1)
					else
						setAccountData (getPlayerAccount(killer), "kills", 1)
					end
				end
			end
		end
	end
end
addEventHandler ("onPlayerWasted", getRootElement(), salvaKills)

client.lua

scoreGrid = guiCreateGridList (0.4, 0.3, 0.2, 0.4, true)
guiGridListAddColumn (scoreGrid, "Account", 0.4)
guiGridListAddColumn (scoreGrid, "Kills", 0.15)
guiGridListAddColumn (scoreGrid, "Deaths", 0.15)
guiGridListAddColumn (scoreGrid, "Ratio", 0.15)
guiSetAlpha (scoreGrid, 0.8)
guiSetVisible (scoreGrid, false)
closeGrid = guiCreateButton (0.6, 0.3, 0.018, 0.03, "X", true)
guiSetAlpha (closeGrid, 0.8)
guiSetVisible (closeGrid, false)

function scoreInfo (accounts, kills, deaths, ratio)
	guiSetVisible (scoreGrid, true)
	guiSetVisible (closeGrid, true)
	showCursor (true)
	if accounts then
		for i, v in ipairs (accounts) do
			guiGridListAddRow (scoreGrid, accounts[i], kills[i], deaths[i], ratio[i])
		end
	end
end
addEvent ("showRank", true)
addEventHandler ("showRank", getRootElement(), scoreInfo)

function clickOptions (button, state, absoluteX, absoluteY)
	if button == "left" then
		if source == closeGrid then
			guiSetVisible (scoreGrid, false)
			guiSetVisible (closeGrid, false)
			showCursor (false)
			guiGridListClear (scoreGrid)
		end
	end
end
addEventHandler ("onClientGUIClick", getRootElement(), clickOptions)

function sendScores ()
	if not guiGetVisible (scoreGrid) then
		triggerServerEvent ("getRank", localPlayer)
	end
end
addCommandHandler ("rank", sendScores)

Agora ficou 100%.

Link to comment
4 minutes ago, Lord Henry said:

Pronto, adicionado o Ratio (Kills dividido pelas Deaths) e corrigido bug de duplicar os dados ao usar o comando várias vezes.

server.lua


function recebeKills ()
	local data = getAccounts ()
	local accTable = {}
	local killsTable = {}
	local deathsTable = {}
	local killDeath = {}
	local kill = 0
	local death = 0
	if not data[1] then
		triggerClientEvent (client, "showScores", client)
		return
	end
	for i, acc in ipairs (data) do
		table.insert (accTable, getAccountName (data[i]))
		if not getAccountData (data[i], "kills") then
			table.insert (killsTable, "0")
			kill = 0
		else
			table.insert (killsTable, tostring (getAccountData (data[i], "kills")))
			kill = tonumber (getAccountData (data[i], "kills"))
		end
		if not getAccountData (data[i], "deaths") then
			table.insert (deathsTable, "0")
			death = 0
		else
			table.insert (deathsTable, tostring (getAccountData (data[i], "deaths")))
			death = tonumber (getAccountData (data[i], "deaths"))
		end
		if death == 0 and kill == 0 then
			table.insert (killDeath, 0)
		else
			table.insert (killDeath, kill / death)
		end
	end
	triggerClientEvent (client, "showRank", client, accTable, killsTable, deathsTable, killDeath)
end
addEvent ("getRank", true)
addEventHandler ("getRank", getRootElement(), recebeKills)

function salvaKills (ammo, killer, weapon, bodypart, stealth)
	if not isGuestAccount (getPlayerAccount(source)) then
		local deaths = getAccountData (getPlayerAccount(source), "deaths")
		if deaths then
			setAccountData (getPlayerAccount(source), "deaths", deaths + 1)
		else
			setAccountData (getPlayerAccount(source), "deaths", 1)
		end
	end
	if killer and killer ~= source then
		if getElementType (killer) == "player" then
			if not isGuestAccount (getPlayerAccount(killer)) then
				local kills = getAccountData (getPlayerAccount(killer), "kills")
				if kills then
					setAccountData (getPlayerAccount(killer), "kills", kills + 1)
				else
					setAccountData (getPlayerAccount(killer), "kills", 1)
				end
			end
		elseif getElementType (killer) == "vehicle" then
			killer = getVehicleController (killer)
			if killer then
				if not isGuestAccount (getPlayerAccount(killer)) then
					local kills = getAccountData (getPlayerAccount(killer), "kills")
					if kills then
						setAccountData (getPlayerAccount(killer), "kills", kills + 1)
					else
						setAccountData (getPlayerAccount(killer), "kills", 1)
					end
				end
			end
		end
	end
end
addEventHandler ("onPlayerWasted", getRootElement(), salvaKills)

client.lua


scoreGrid = guiCreateGridList (0.4, 0.3, 0.2, 0.4, true)
guiGridListAddColumn (scoreGrid, "Account", 0.4)
guiGridListAddColumn (scoreGrid, "Kills", 0.15)
guiGridListAddColumn (scoreGrid, "Deaths", 0.15)
guiGridListAddColumn (scoreGrid, "Ratio", 0.15)
guiSetAlpha (scoreGrid, 0.8)
guiSetVisible (scoreGrid, false)
closeGrid = guiCreateButton (0.6, 0.3, 0.018, 0.03, "X", true)
guiSetAlpha (closeGrid, 0.8)
guiSetVisible (closeGrid, false)

function scoreInfo (accounts, kills, deaths, ratio)
	guiSetVisible (scoreGrid, true)
	guiSetVisible (closeGrid, true)
	showCursor (true)
	if accounts then
		for i, v in ipairs (accounts) do
			guiGridListAddRow (scoreGrid, accounts[i], kills[i], deaths[i], ratio[i])
		end
	end
end
addEvent ("showRank", true)
addEventHandler ("showRank", getRootElement(), scoreInfo)

function clickOptions (button, state, absoluteX, absoluteY)
	if button == "left" then
		if source == closeGrid then
			guiSetVisible (scoreGrid, false)
			guiSetVisible (closeGrid, false)
			showCursor (false)
			guiGridListClear (scoreGrid)
		end
	end
end
addEventHandler ("onClientGUIClick", getRootElement(), clickOptions)

function sendScores ()
	if not guiGetVisible (scoreGrid) then
		triggerServerEvent ("getRank", localPlayer)
	end
end
addCommandHandler ("rank", sendScores)

Agora ficou 100%.

Muito obrigado, mas sobre a GUI que eu mandei a print acima não entendi pq deu erro, eu troquei certinho os códigos renomeiei certinho, mesmo assim bugou

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...