Raised This Month: $23 Target: $400
 5% 

[TF2] Add/Remove Condition Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Mitchell
~lick~
Join Date: Mar 2010
Old 01-07-2015 , 15:32   Re: [TF2] Add/Remove Condition Menu
Reply With Quote #11

Quote:
Originally Posted by Hippo_ View Post
I can't give you error logs as it doesn't really show anything, but whenever I have this plugin loaded, my server would crash after five or ten minutes. Are you aware of this being an issue?
Are you constantly opening the menu and using it?

Edit: the fact this doesn't compile is bad.
You could just add the 'TFCond:' before all the StringToInt...
And why not make an override to the command than to make a convar..
Im actually suprised to the fact that you use BuildPath on plugin start, and store it into a variable, but you don't save the information into a variable from the KvFile.
But hey, i'd rather you not listen to me, and perhaps get a spot on the SM tutorial as practices not to follow when learning a language.
__________________

Last edited by Mitchell; 01-07-2015 at 16:58.
Mitchell is offline
NeonHeights
Member
Join Date: Dec 2012
Old 01-23-2015 , 15:25   Re: [TF2] Add/Remove Condition Menu
Reply With Quote #12

This plugin is NOT stable.

Typed "/cond 2" in chat while the menu was up and it crashed the server, repeated it and it crashed a second time.

Pls fix.
__________________
NeonHeights is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 01-24-2015 , 21:00   Re: [TF2] Add/Remove Condition Menu
Reply With Quote #13

Apologies if it seems like I'm hijacking this plugin & thread (spoiler alert: I'm not) but I decided to advance this plugin a bit further and optimize it.

ConVars:
Code:
sm_cond_status - 1 - Status of the plugin: (1 = on, 0 = off)
sm_cond_admin - 0 - Enable/disable menu to follow a specific command access. (Command Access: TF2_Use_Conditions)
Command Access:
Code:
TF2_Use_Conditions - (Default Flag: ADMFLAG_RESERVATION [a])
Configuration file layout: (per condition)
Code:
"Name"	//Name of the condition, shows up in the menu.
{
	"condID"	""	//Condition ID!
	"Flags"		""	//Individual flags required to use this condition. (Works even if the admin ConVar is enabled).
}
Attached Files
File Type: cfg tf2_addcond.cfg (484 Bytes, 329 views)
File Type: sp Get Plugin or Get Source (AddCond_Advanced.sp - 611 views - 5.3 KB)
__________________
Programmer (Accepting Commissions, Add me on Discord)
Community: Vertex Heights | Discord: Drixevel#5049
Drixevel is offline
Rage_Inducer
New Member
Join Date: Jun 2015
Old 06-29-2015 , 16:12   Re: [TF2] Add/Remove Condition Menu
Reply With Quote #14

Made a nice config for the updated version which contains all the conds that I thought would be useful.
Attached Files
File Type: cfg tf2_addcond.cfg (1.6 KB, 338 views)
Rage_Inducer is offline
Send a message via AIM to Rage_Inducer Send a message via Yahoo to Rage_Inducer Send a message via Skype™ to Rage_Inducer
dildoughy
Member
Join Date: Nov 2015
Old 03-16-2016 , 17:48   Way to target non-admin players?
Reply With Quote #15

Is there a way for me to use the addconds on non-admin flagged players? I don't want to have my players using it willy-nilly on themselves, but I thought it would be fun if I could use the @all, @alive, etc. targets, or by name, whatever. One team all gets jarated, the other team gets milked, etc.

I have root access/z flag and currently allow my b flag admins to use the plugin.
dildoughy is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-25-2016 , 17:16   Re: [TF2] Add/Remove Condition Menu
Reply With Quote #16

OK, so I had this code pointed at me in another thread.

Judging from lines 59-68, I'm going to assume you've never heard of a do-while loop. It's similar to a while loop, but it always happens at least once as the check is moved to the end.

In other words, it looks like this:

PHP Code:
    if(KvGotoFirstSubKey(DB)){
        do{
            
KvGetString(DB"condID"tempsizeof(temp));
            
KvGetString(DB"name"namesizeof(name), "NULL_NAME");
            
Format(namesizeof(name), "%s[%s]"name, (TF2_IsPlayerInCondition(clientStringToInt(temp)) ? "x" ""));
            
AddMenuItem(menutempname);
        } while(
KvGotoNextKey(DB));
    } 
The reason you can get away with this is because KvGotoFirstSubKey guarantees you have at least one subkey and thus it gets rid of 4 lines of redundant code.
__________________
Am I back? Well, we'll see.

Last edited by Powerlord; 07-25-2016 at 17:18.
Powerlord is offline
The enigma
Member
Join Date: Feb 2016
Old 09-02-2016 , 06:38   Re: [TF2] Add/Remove Condition Menu
Reply With Quote #17

Is it possible to make an admin menu for the cond menu to apply it to players?
The enigma is offline
enderandrew
Senior Member
Join Date: Jun 2020
Old 07-04-2020 , 17:59   Re: [TF2] Add/Remove Condition Menu
Reply With Quote #18

Here is my attempt at updating syntax on this:
Attached Files
File Type: sp Get Plugin or Get Source (AddCond_Advanced.sp - 8 views - 5.3 KB)
enderandrew is offline
venter25
Member
Join Date: Jul 2019
Old 08-01-2020 , 14:55   Re: [TF2] Add/Remove Condition Menu
Reply With Quote #19

Any help with this? I am getting this error.


L 08/01/2020 - 14:53:13: [SM] Exception reported: Invalid client index 0
L 08/01/2020 - 14:53:13: [SM] Blaming: AddCond_Advanced.smx
L 08/01/2020 - 14:53:13: [SM] Call stack trace:
L 08/01/2020 - 14:53:13: [SM] [0] IsPlayerAlive
L 08/01/2020 - 14:53:13: [SM] [1] Line 106, /home/forums/content/files/3/0/1/5/9/7/182361.attach::Cmd_CondMenu
venter25 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 16:14.


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