Raised This Month: $ Target: $400
 0% 

Automatic sv_tags adder


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mike_BoG
SourceMod Donor
Join Date: Jul 2011
Old 02-21-2012 , 11:18   Automatic sv_tags adder
Reply With Quote #1

Hi guys,

So I was running a plugin that modifies respawntimes without adding the required tags (respawntimes, norespawntime) and VALVE didn't like this, because they want tags to be added mehmeh. Anyhow, how would I make a plugin add this by it's own?
Mike_BoG is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 02-21-2012 , 12:54   Re: Automatic sv_tags adder
Reply With Quote #2

I pulled this from DarthNinja's TF2 Stats plugin.

PHP Code:
TagsCheck(const String:tag[])
{
    new 
Handle:hTags FindConVar("sv_tags");
    
decl String:tags[255];
    
GetConVarString(hTagstagssizeof(tags));

    if (!(
StrContains(tagstagfalse)>-1))
    {
        
decl String:newTags[255];
        
Format(newTagssizeof(newTags), "%s,%s"tagstag);
        
SetConVarString(hTagsnewTags);
        
GetConVarString(hTagstagssizeof(tags));
    }
    
CloseHandle(hTags);

__________________
Dr. McKay is offline
schmidt
BANNED
Join Date: Mar 2010
Location: Milky Way/Earth
Old 02-23-2012 , 05:07   Re: Automatic sv_tags adder
Reply With Quote #3

PHP Code:
new Handle:hTags FindConVar("sv_tags");
CloseHandle(hTags); 
Hm, this must be CloseHandle?
If 'yes', new question: If any function returned Handle, he always must be closed (CloseHandle)?

Last edited by schmidt; 02-23-2012 at 05:14.
schmidt is offline
Send a message via Skype™ to schmidt
Despirator
Senior Member
Join Date: Jun 2011
Location: Kazakhstan ->Shymkent
Old 02-23-2012 , 07:20   Re: Automatic sv_tags adder
Reply With Quote #4

Quote:
Originally Posted by schmidt View Post
PHP Code:
new Handle:hTags FindConVar("sv_tags");
CloseHandle(hTags); 
Hm, this must be CloseHandle?
If 'yes', new question: If any function returned Handle, he always must be closed (CloseHandle)?
not always
Despirator is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 02-28-2012 , 14:02   Re: Automatic sv_tags adder
Reply With Quote #5

You don't have to close it in this case, since it's just a cloned handle from the actual convar's handle. In most other cases, you will have to close a handle (especially if it's recreated multiple times), otherwise you'll have a leak.
bl4nk is offline
schmidt
BANNED
Join Date: Mar 2010
Location: Milky Way/Earth
Old 02-29-2012 , 04:29   Re: Automatic sv_tags adder
Reply With Quote #6

Thanks, i realized
schmidt is offline
Send a message via Skype™ to schmidt
Nolongerinthegame
AlliedModders Donor
Join Date: Sep 2005
Old 03-03-2012 , 14:24   Re: Automatic sv_tags adder
Reply With Quote #7

Quote:
Originally Posted by Mike_BoG View Post
Hi guys,

So I was running a plugin that modifies respawntimes without adding the required tags (respawntimes, norespawntime) and VALVE didn't like this, because they want tags to be added mehmeh. Anyhow, how would I make a plugin add this by it's own?
If they blocked it, then why are you still trying to get around it? Its not fair on players joining the servers believing a server to be something else. Valve are actively cracking down on mods if you have read of their comments on the Mailing List.

Just offering my 2 cents, there is nothing to stop Valve creating a TF2 or similar update, which renders this useuless.

Last edited by Nolongerinthegame; 03-03-2012 at 14:26.
Nolongerinthegame is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 03-03-2012 , 14:45   Re: Automatic sv_tags adder
Reply With Quote #8

Quote:
Originally Posted by nelioneil View Post
If they blocked it, then why are you still trying to get around it? Its not fair on players joining the servers believing a server to be something else. Valve are actively cracking down on mods if you have read of their comments on the Mailing List.

Just offering my 2 cents, there is nothing to stop Valve creating a TF2 or similar update, which renders this useuless.
I'm pretty sure he's asking how he can modify the plugin to add the respawntimes tag.
__________________
Dr. McKay 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 07:10.


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