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

help

#1

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.


#2

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)

#3

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

Late reply:
Works like a charm! Thanks again!


#4

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


#5

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


#6

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


#7

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


#8

oh? what is that code for steamid need?


#9

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


#10

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…


#11

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)

How Can i Enable? [The STEAM NEED]
Could someone help me with a Steam script?
#12

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


#13

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


#14

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


#15

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


#16

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


#17

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:


#18

vMenu is same a side script? [menu]

so that is in the resource folder so ?


#19

I found it thanks for you help.