• How to protect our gamemode from cheats?
    6 replies, posted
Hello guys, I am currently making my own RP gamemode, and I was wondering how to protect my gamemode from cheaters because I want to make the entire code and don't take any external addons. Since I did a money system and I'll probably use menus (NPCs for exemple) I would like to know how to protect my gamemode from cheaters and people that may able to run clientside functions. (which do some net and give you money from server) Thank you for reading me and hope I'll get some help.
Atleast you're trying to secure your net messages. Here's a basic guide: -Check for negative money values (If you need to) -Cap stuff -Never use net.WriteEntity(LocalPlayer()) (Use the function call back for that) -And probably something else I forgot
Is there any way to run clientside functions without sv_allowcslua ? Because if they can, they could spam the clientside money request function and then have unlimited money.
Yes, you can run stuff without sv_allowcslua. And what do you mean by money request function? Add a check serverside.
Never trust client, allow him only read values but server should validate that hes not trying anything nasty. Sv allowcslua 0 + some anticheat would get you pretty far in my opinion, but keep in mind you cant probably protect everything from everyone. [editline]18th December 2015[/editline] Dont allow client to set money, what are you trying to do?
I'll try to explain you what i'm trying to do by an exemple: You're to the hospital and then you talk to an NPC to get some health and it costs like 100$. I'll probably make a menu for this and the client will press the button but I need to use net to remove the money from the player which is serverside.
Just send net that take money but remember to check negative values, i dont think people will spam take money stuff, and as kevlon said, dont use WriteEntity.
Sorry, you need to Log In to post a reply to this thread.