Raised This Month: $359 Target: $400
 89%   Almost there!

Solved need help with Environment Items ( csgo)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
raj kaul
Senior Member
Join Date: Mar 2018
Location: www.lotgaming.xyz
Old 08-11-2022 , 04:46   need help with Environment Items ( csgo)
Reply With Quote #1

So I want to use ent_create drone gun command, for this we need to do sv_cheats 1 issue is i want to do this only for admins but when we do cheats 1 other players can also use all cheats commands
Is there any way I can use this without doing sv cheats 1 or anything?

I tried multiple sv_cheats 1 admin plugins but those are not working for ent_create drone gun this command
__________________

Last edited by raj kaul; 08-11-2022 at 19:14. Reason: fixed
raj kaul is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 08-11-2022 , 09:05   Re: need help with Environment Items ( csgo)
Reply With Quote #2

PHP Code:
static const char CMD[] = "ent_create";
static 
int FLAGS;

public 
void OnPluginStart()
{
    
FLAGS GetCommandFlags(CMD);
    
SetCommandFlags(CMD, (FLAGS & ~FCVAR_CHEAT));
}

public 
void OnPluginEnd()
{
    
SetCommandFlags(CMDFLAGS);

But this plugin will allow to use ent_create with any arguments for any player.
__________________
Grey83 is online now
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 08-11-2022 , 09:08   Re: need help with Environment Items ( csgo)
Reply With Quote #3

Perhaps this will help to ban the command to players without admin rights, but you need to check.
PHP Code:
static const char CMD[] = "ent_create";
static 
int FLAGS;

public 
void OnPluginStart()
{
    
FLAGS GetCommandFlags(CMD);
    
SetCommandFlags(CMD, ( & ~FCVAR_CHEAT));

    
AddCommandListener(Cmd_DroneGunCMD);
}

public 
Action Cmd_DroneGun(int client, const char[] commandint argc)
{
    return 
client && IsClientInGame(client) && GetUserFlagBits(client) ? Plugin_Continue Plugin_Handled;
}

public 
void OnPluginEnd()
{
    
SetCommandFlags(CMDFLAGS);

__________________
Grey83 is online now
raj kaul
Senior Member
Join Date: Mar 2018
Location: www.lotgaming.xyz
Old 08-11-2022 , 19:13   Re: need help with Environment Items ( csgo)
Reply With Quote #4

thank you grey
__________________

Last edited by raj kaul; 08-11-2022 at 19:13.
raj kaul is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:46.


Powered by vBulletin®
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Theme made by Freecode