View Single Post
eyal282
Veteran Member
Join Date: Aug 2011
Old 02-13-2018 , 15:42   Re: [INS] Guns Menu - modifacation
Reply With Quote #2

I don't know anything about your game but it is a bad idea to set sv_cheats, tell me if this method works because it's undeniably safer, though maybe your source game doesn't make sv_cheats important, it is game-breaking when changed in L4D2.

SetConVarBool(FindConVar("sv_cheats"), true, false);

------>

new flags = GetCommandFlags("give_weapon");
SetCommandFlags("give_weapon", flags & ~FCVAR_CHEAT);




Also,

SetConVarBool(FindConVar("sv_cheats"), false, false);


----->

SetCommandFlags("give_weapon", flags);
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline