Raised This Month: $ Target: $400
 0% 

toggle cfg


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cameltoe Joe
Member
Join Date: Nov 2010
Old 01-24-2011 , 05:45   toggle cfg
Reply With Quote #1

I have added 2 configs to the adminmenu_cfgs.txt in an attempt to make it easier for my admins to toggle crits on and off during events this works ok, But I did notice that the melee plugin and the ff plugin works even easier, Is it possible to get the same functionality via a toggle in a cfg and if so could you explain how?
Thanks in advance
__________________
A man is not old until reality takes the place of is dreams... I just keep dreaming

{ASBO}Gaming
cameltoe Joe is offline
micazoid
Veteran Member
Join Date: Oct 2010
Location: Munich - Germany
Old 01-24-2011 , 19:48   Re: toggle cfg
Reply With Quote #2

Can you link me to the plugins u mentioned? It is possible to vreate ur own menupoints. I will write it for you and explain it
__________________
micazoid is offline
cameltoe Joe
Member
Join Date: Nov 2010
Old 01-27-2011 , 03:40   Re: toggle cfg
Reply With Quote #3

Updated
Quote:
Originally Posted by micazoid View Post
Can you link me to the plugins u mentioned? It is possible to vreate ur own menupoints. I will write it for you and explain it
UPDATE
The FF plugin is part of funcommandsX
and the melee is http://forums.alliedmods.net/showthread.php?t=132616
this one
however a group member has offered to write a plugin for me thankyou for your time
__________________
A man is not old until reality takes the place of is dreams... I just keep dreaming

{ASBO}Gaming
cameltoe Joe is offline
micazoid
Veteran Member
Join Date: Oct 2010
Location: Munich - Germany
Old 01-27-2011 , 05:28   Re: toggle cfg
Reply With Quote #4

Quote:
however a group member has offered to write a plugin for me thankyou for your time
What exactly Do you need a plugin for? I wrote your menu anyways ^^
Attached Files
File Type: txt cameltoe custommenu.txt (605 Bytes, 154 views)
__________________
micazoid is offline
cameltoe Joe
Member
Join Date: Nov 2010
Old 01-27-2011 , 08:22   Re: toggle cfg
Reply With Quote #5

Basically the melee plugin we use occasionally crashes the server . So i wrote a cfg that strips weapons from all players as a temporary replacement for the melee plugin, I did not know how to add the sm_menu items correctly, now I do, the problem I have is that it takes 2 separate cfg's to toggle crits on or crits off, my question was how would I conbine the 2 configs in order to have it toggle rather than use the 2 menu items listed below



These are the 2 configs I have

critson
Quote:
tf_weapon_criticals 0
critsoff
Quote:
tf_weapon_criticals 1
Attached Thumbnails
Click image for larger version

Name:	vwhopxk.jpg
Views:	272
Size:	16.8 KB
ID:	81262  
__________________
A man is not old until reality takes the place of is dreams... I just keep dreaming

{ASBO}Gaming
cameltoe Joe is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 01-27-2011 , 10:06   Re: toggle cfg
Reply With Quote #6

Ehm, you can get away with something like, and use the value of if it to toggle rather than executing configs.
PHP Code:
g_hYoda FindConVar(tf_weapon_criticals);

if(
GetConVarInt(g_hYoda))
SetConVarInt(g_hYoda0);
else
SetConVarInt(g_hYoda1); 
__________________
thetwistedpanda is offline
micazoid
Veteran Member
Join Date: Oct 2010
Location: Munich - Germany
Old 01-28-2011 , 03:33   Re: toggle cfg
Reply With Quote #7

If I get u right, then you want to turn off/on crits with the same cfg as you strip down weapons to melee?

Why not adding tf_weapon_criticals 1/0 in the cfgs?
__________________
micazoid is offline
cameltoe Joe
Member
Join Date: Nov 2010
Old 01-29-2011 , 04:37   Re: toggle cfg
Reply With Quote #8

Done works a treat thank you
__________________
A man is not old until reality takes the place of is dreams... I just keep dreaming

{ASBO}Gaming
cameltoe Joe is offline
micazoid
Veteran Member
Join Date: Oct 2010
Location: Munich - Germany
Old 02-02-2011 , 03:35   Re: toggle cfg
Reply With Quote #9

BTW: For your Meleeproblem

http://forums.alliedmods.net/showpos...&postcount=356
__________________
micazoid is offline
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 04:31.


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