[Solved] Could someone help me with a anti Steam script?

Hello,

I’m working on a roleplay server. For this server we need the username setting that you can use with FiveM.
This only works when you have Steam closed down. I’ve already created (got some code from the internet and edited it) a script that gets my the client license so I can use it for other stuff like a menu. But I still have to prevent people from using Steam. Any help would very much be appreciated.

1 Like

Made a quick script that will disconnect any players who join with steam running. Just put it in your code or make a resource for it.

AddEventHandler('playerConnecting',function(Name,setKickReason,deferrals)	
	for _, v in ipairs(GetPlayerIdentifiers(source)) do
		if string.find(v,"steam") then
			setKickReason("Please close Steam before joining!") -- set reason
			CancelEvent() -- stop player connecting
			break
		end
	end
end)
2 Likes

Thank you! Will try it out when I’m back from school.

Late reply:
Works like a charm! Thanks again!

Can you give me you script for steam using i looking for it :stuck_out_tongue:

Can you like try to read? It’s the first reply…

yeah so he was lookin for a anti steam so maybe he haves a backup whitout that anti script for me?

Why would you need the script??? There is a part of code that you can use??

oh? what is that code for steamid need?

What do you mean? @Yadiiiig is right. The first reply is the code you’ll need to block user from joining with Steam.

But i looking for the code that just not block steam?

i want a server with the steamid so i was hoping that the poster can help me with that…

I haven’t got time to test it out but it maybe works when you replace steam on line 3 with license.

AddEventHandler('playerConnecting',function(Name,setKickReason,deferrals)	
	for _, v in ipairs(GetPlayerIdentifiers(source)) do
		if string.find(v,"license") then
			setKickReason("Steam has to be open before joining!") -- set reason
			CancelEvent() -- stop player connecting
			break
		end
	end
end)

this is the same anti steam? or you sat just edit a little bit? so

It should prevent people from joining without steam open. But as I said, I did not test this.

Not working or did i paste is on the wrong place?

Just a tip, its a server side script. :wink:

so it just need in the resource ? xd yeah srry beginner here!

1 Like

Its not bad to be a noob at something. But do some resource. After that you will probably now what a server side scripts is.

The best learning advise I can give :stuck_out_tongue:

vMenu is same a side script? [menu]

so that is in the resource folder so ?

I found it thanks for you help.

1 Like

How is this implemented?