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

[CS:GO] Force players & admins to use a clan tag.


Post New Thread Reply   
 
Thread Tools Display Modes
Darkness_
Veteran Member
Join Date: Nov 2014
Old 01-06-2015 , 13:34   Re: [CS:GO] Force players & admins to use a clan tag.
Reply With Quote #11

Here is the fixed version of Arkarr's plugin.
Attached Files
File Type: smx forceclantag.smx (3.4 KB, 97 views)
File Type: sp Get Plugin or Get Source (forceclantag.sp - 378 views - 1.1 KB)
Darkness_ is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 01-06-2015 , 16:07   Re: [CS:GO] Force players & admins to use a clan tag.
Reply With Quote #12

It would probably be better to hook the Player Resource entity on think, then to set the client's tag every frame. (64 times a second, or worse 128 times a second...) It's just common practice to find the the most efficient way of doing something with the least amount of processing power.
edit: herp derp, cant even set an array of strings for m_szClan, better off to use SetClanTag when the client's settings are changed, as this happens only on average once per client.

Last edited by Mitchell; 01-06-2015 at 16:25.
Mitchell is offline
Chesterfield
Senior Member
Join Date: Apr 2013
Old 01-06-2015 , 16:11   Re: [CS:GO] Force players & admins to use a clan tag.
Reply With Quote #13

It works perfect Darkness, thanks you and Arkarr.

I wonder if you could make now a command to force admins to use an specific tag, because now only normal users are being "forced"

Is this possible? thanks in advanced
Chesterfield is offline
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 01-06-2015 , 20:13   Re: [CS:GO] Force players & admins to use a clan tag.
Reply With Quote #14

@UP
you got the code, play a bit with it yourself. Ask questions if you're not sure, but don't require people do to everything for you. You basically got everything you need in code above.
LambdaLambda is offline
Darkness_
Veteran Member
Join Date: Nov 2014
Old 01-07-2015 , 01:24   Re: [CS:GO] Force players & admins to use a clan tag.
Reply With Quote #15

Quote:
Originally Posted by Chesterfield View Post
It works perfect Darkness, thanks you and Arkarr.

I wonder if you could make now a command to force admins to use an specific tag, because now only normal users are being "forced"

Is this possible? thanks in advanced
Here, I'll give you the code need and you figure out where to put it.

PHP Code:
new Handle:AdminTag INVALID_HANDLE;

AdminTag CreateConVar("sm_admin_clan""[ADMIN]""Default admin clan tag");

        if (
IsValidClient(i) && CheckCommandAccess(i"sm_admin"ADMFLAG_GENERIC))
        {
            
decl String:sCurTag[40], String:sCvarTag[40];
            
CS_GetClientClanTag(isCurTagsizeof(sCurTag));
            
GetConVarString(AdminTagsCvarTagsizeof(sCvarTag));
            if (!
StrEqual(sCurTagsCvarTag))
                
CS_SetClientClanTag(isCvarTag);
        } 
Darkness_ is offline
Chesterfield
Senior Member
Join Date: Apr 2013
Old 01-07-2015 , 10:05   Re: [CS:GO] Force players & admins to use a clan tag.
Reply With Quote #16

Works perfect, thanks for your help Darkness, much appreciated!
Chesterfield is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 01-09-2015 , 08:21   Re: [CS:GO] Force players & admins to use a clan tag.
Reply With Quote #17

Quote:
Originally Posted by Chesterfield View Post
Works perfect, thanks for your help Darkness, much appreciated!
lol wtf ? How to create command with CVAR ? Also, sorry, I just forget to put a god damn stocks...
__________________
Want to check my plugins ?
Arkarr 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 15:31.


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