Raised This Month: $51 Target: $400
 12% 

"viewmodel_fov" without sv_cheats == 1


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tauphi
SourceMod Donor
Join Date: Sep 2004
Location: Germany
Old 01-11-2009 , 14:32   "viewmodel_fov" without sv_cheats == 1
Reply With Quote #1

Hello,

when I use the following code:
PHP Code:
SetCommandFlags("viewmodel_fov", (GetCommandFlags("viewmodel_fov") & ~FCVAR_CHEAT)); 
I am still not able to use the command on a server ... it still says, that sv_cheats has to be 1 ...
How can I allow people to use that command on a public server?
__________________
Tauphi is offline
Send a message via ICQ to Tauphi Send a message via Skype™ to Tauphi
SAMURAI16
BANNED
Join Date: Sep 2006
Old 01-12-2009 , 07:52   Re: "viewmodel_fov" without sv_cheats == 1
Reply With Quote #2

try this
Code:
public fn_func( iClient ) {     RunCheatCommand( iClient, "viewmodel_fov" ); } stock RunCheatCommand(client, const String:format[], any:...) {     decl String:Command[256];     VFormat(Command, sizeof(Command), format, 3);     decl String:FirstArg[1][100];     ExplodeString(Command, " ", FirstArg, 1, 100);     new flags = GetCommandFlags(FirstArg[0]);     if(flags != INVALID_FCVAR_FLAGS)     {         new TempFlags = flags &~ (FCVAR_PROTECTED|FCVAR_NOTIFY|FCVAR_CHEAT|FCVAR_SPONLY);         if(SetCommandFlags(FirstArg[0], TempFlags))         {             FakeClientCommand(client, Command);             if(!SetCommandFlags(FirstArg[0], flags))                 LogError("Error while restoring \"%s\"'s command flags.", FirstArg[0]);         }         else             LogError("Error while stripping \"%s\"'s command flags.", FirstArg[0]);     }     else         LogError("Could not find the command: \"%s\"", FirstArg[0]); }
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
Tauphi
SourceMod Donor
Join Date: Sep 2004
Location: Germany
Old 01-14-2009 , 17:14   Re: "viewmodel_fov" without sv_cheats == 1
Reply With Quote #3

Does not work ...

the server posts that:
PHP Code:
Could not find the command"viewmodel_fov" 
any other idea?
__________________
Tauphi is offline
Send a message via ICQ to Tauphi Send a message via Skype™ to Tauphi
Grrrrrrrrrrrrrrrrrrr
Senior Member
Join Date: Oct 2007
Old 01-14-2009 , 23:39   Re: "viewmodel_fov" without sv_cheats == 1
Reply With Quote #4

Idea: enable sv_cheats and then use the cheat control plugin to stop players from using the cheats you don't want them to use.
__________________
Note: "r" letters = 19 ; CHEESE: I LIKE CHOCOLATE MILK
Grrrrrrrrrrrrrrrrrrr is offline
Send a message via AIM to Grrrrrrrrrrrrrrrrrrr
Grrrrrrrrrrrrrrrrrrr
Senior Member
Join Date: Oct 2007
Old 01-15-2009 , 18:53   Re: "viewmodel_fov" without sv_cheats == 1
Reply With Quote #5

An even better idea: learn how the Admin Cheats plugin works and use that same method to enable and disable certain cheats
__________________
Note: "r" letters = 19 ; CHEESE: I LIKE CHOCOLATE MILK
Grrrrrrrrrrrrrrrrrrr is offline
Send a message via AIM to Grrrrrrrrrrrrrrrrrrr
Reply



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 20:42.


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