Jump to content
dragontechi

anti dupe GMnotice

Recommended Posts

 

Hello, I'm using this anti dupe and I try to get people who are caught trying to clone to send a message through the gm system to the entire server with the name of the character, I'm trying to put

 

        local cha_name = GetChaDefaultName ( role )
        Notice ( cha_name.."It's trying to clone" )

 

 

but it does not send the message but when I only use notice the message is also sent I have also tried to add a dialog box to deliver a warning message

 

    HelpInfo(role, 0, "hey the whole server already knows what you are doing this is a joke next time it will be ip ban ")

 

 

 

in this part i am modifying but it only works with notice

----------------
-- cha_timer kick hook
----------------
function anti_dupe_hook(ignore,cha,freq,time)
	if(IsPlayer(cha) == 1)then
	local orginal_cha = cha
		if(ChaIsBoat(cha) == 1)then
			ship = TurnToShip(cha)
			cha = TurnToCha(cha)
		end
	local key = GetPlayerKey(cha)
		if(file_exists(character.kicks..key..".txt") ~= false)then
			if(ChaIsBoat(orginal_cha) == 1)then
				KickClone(ship)
				else
				KickClone(cha)
			end
			os.remove(character.kicks..key..".txt")
      Notice('hey i caught you cloning')
		end
	end
end

 

https://mega.nz/file/YZkWFBDb#NRAhrkDZfOQ8SirKys53O7Ve6Cz4zBkq595FmMb8orA

Share this post


Link to post
Share on other sites

Following the logic, the player should not receive your HelpInfo as they are kicked out before that packet is actually sent out (that’s my assumption, as I can’t see a HelpInfo method in your code).

  • Thanks 1

Share this post


Link to post
Share on other sites

Hello @dragontechi,

 

As @champ mentioned, I think you should call HelpInfo() function before the KickClone() one. Also make sure that you pass a valid character descriptor to the HelpInfo() function (cha or ship instead of role).


Share this post


Link to post
Share on other sites

ddddd

 

image.png.1aeda2bd9a141564eedc5d16e72443a6.png

With this code it works for me sending a message by notice

function anti_dupe_hook(ignore,cha,freq,time)
	if(IsPlayer(cha) == 1)then
	local orginal_cha = cha
		if(ChaIsBoat(cha) == 1)then
			ship = TurnToShip(cha)
			cha = TurnToCha(cha)
		end
	local key = GetPlayerKey(cha)
		if(file_exists(character.kicks..key..".txt") ~= false)then
			if(ChaIsBoat(orginal_cha) == 1)then
				KickClone(ship)
				else
				KickClone(cha)
			end
			os.remove(character.kicks..key..".txt")
        local cha_name = GetChaDefaultName ( cha )
        Notice( cha_name.."Fue atrapado tratando de clonar modo Test alerta fake" )
		end
	end
end

but if I try to make the message send the same message through gmnotice the notification does not come out

 

-- cha_timer kick hook
----------------
function anti_dupe_hook(ignore,cha,freq,time)
	if(IsPlayer(cha) == 1)then
	local orginal_cha = cha
		if(ChaIsBoat(cha) == 1)then
			ship = TurnToShip(cha)
			cha = TurnToCha(cha)
		end
	local key = GetPlayerKey(cha)
		if(file_exists(character.kicks..key..".txt") ~= false)then
			if(ChaIsBoat(orginal_cha) == 1)then
				KickClone(ship)
				else
				KickClone(cha)
			end
			os.remove(character.kicks..key..".txt")
        local cha_name = GetChaDefaultName ( cha )
        GMNotice( cha_name.."Got caught trying to clone Test mode fake alert" )
		end
	end
end

@V3ct0r @morderany idea how to make the message in gm notice work

 

 

 

@

 

 

Share this post


Link to post
Share on other sites
6 hours ago, dragontechi said:

ddddd

 

image.png.1aeda2bd9a141564eedc5d16e72443a6.png

With this code it works for me sending a message by notice


function anti_dupe_hook(ignore,cha,freq,time)
	if(IsPlayer(cha) == 1)then
	local orginal_cha = cha
		if(ChaIsBoat(cha) == 1)then
			ship = TurnToShip(cha)
			cha = TurnToCha(cha)
		end
	local key = GetPlayerKey(cha)
		if(file_exists(character.kicks..key..".txt") ~= false)then
			if(ChaIsBoat(orginal_cha) == 1)then
				KickClone(ship)
				else
				KickClone(cha)
			end
			os.remove(character.kicks..key..".txt")
        local cha_name = GetChaDefaultName ( cha )
        Notice( cha_name.."Fue atrapado tratando de clonar modo Test alerta fake" )
		end
	end
end

but if I try to make the message send the same message through gmnotice the notification does not come out

 


-- cha_timer kick hook
----------------
function anti_dupe_hook(ignore,cha,freq,time)
	if(IsPlayer(cha) == 1)then
	local orginal_cha = cha
		if(ChaIsBoat(cha) == 1)then
			ship = TurnToShip(cha)
			cha = TurnToCha(cha)
		end
	local key = GetPlayerKey(cha)
		if(file_exists(character.kicks..key..".txt") ~= false)then
			if(ChaIsBoat(orginal_cha) == 1)then
				KickClone(ship)
				else
				KickClone(cha)
			end
			os.remove(character.kicks..key..".txt")
        local cha_name = GetChaDefaultName ( cha )
        GMNotice( cha_name.."Got caught trying to clone Test mode fake alert" )
		end
	end
end

@V3ct0r @morderany idea how to make the message in gm notice work

 

 

 

@

 

 

Make sure your game server supports GMNotice function.

  • Thanks 1

Share this post


Link to post
Share on other sites
9 hours ago, dragontechi said:

it does not seem that it is not tine notice how could it be added

In the original, the GMNotice() function is present in 2.x versions of the server. To add it to the server version 1.3x, you need to patch GameServer.exe and GroupServer.exe.


Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...