AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [INC] CS:S Clan Tags (https://forums.alliedmods.net/showthread.php?t=149322)

psychonic 02-05-2011 10:23

[INC] CS:S Clan Tags
 
2 Attachment(s)
CS:S Clan Tags
Allows getting and setting of clan tags in CS:S.

Code:
stock CS_GetClientClanTag(client, String:buffer[], size); stock CS_SetClientClanTag(client, const String:tag[]);
*SetClanTag stock was adapted from a snippet by Dr!fter.

If you use the inc in your plugin, it will require the attached gamedata file. If/when it breaks, a new gamedata file will be posted. No changes to your plugin will be needed.

thetwistedpanda 02-05-2011 10:58

Re: [INC] CS:S Clan Tags
 
I <3 you for this; all we need now is a method of detecting when a tag changes and the evilness can begin.

GoD-Tony 02-05-2011 11:11

Re: [INC] CS:S Clan Tags
 
Going to try this out today, thanks!

Mitchell 02-05-2011 12:15

Re: [INC] CS:S Clan Tags
 
<3 love this thanks!

berni 02-05-2011 14:00

Re: [INC] CS:S Clan Tags
 
Quote:

Originally Posted by thetwistedpanda (Post 1407711)
I <3 you for this; all we need now is a method of detecting when a tag changes and the evilness can begin.

OnClientSettingsChanged() -> cl_clanid

psychonic 02-05-2011 14:13

Re: [INC] CS:S Clan Tags
 
Quote:

Originally Posted by berni (Post 1407828)
OnClientSettingsChanged() -> cl_clanid

Just to elaborate more, in case it further helps anyone, OnClientSettingsChanged fires when any client-replicated var changes. GetClientInfo can then be used to look up the value of any var the client replicates back to the server (cl_clanid in this case).

You can look up a client's cl_clanid on join, and then look in OnClientSettingsChanged to see if it has changed to know if the clan tag has actually changed.

thetwistedpanda 02-05-2011 15:16

Re: [INC] CS:S Clan Tags
 
Works like a charm; psychonic you have a syntax error on line 59 of your .inc file :3, missing a ;.

psychonic 02-05-2011 15:42

Re: [INC] CS:S Clan Tags
 
Quote:

Originally Posted by thetwistedpanda (Post 1407899)
Works like a charm; psychonic you have a syntax error on line 59 of your .inc file :3, missing a ;.

*line 58. (59 is the next line on which it noticed)

Semicolons aren't required in pawn unless you're explicitly forcing them to be :3

Regardless, thanks! Fixed.

thetwistedpanda 02-05-2011 15:47

Re: [INC] CS:S Clan Tags
 
I was close enough haha; but yeah, if anyone has it forced and included it, error time. Thanks for fixing.

kossolax 02-05-2011 18:07

Re: [INC] CS:S Clan Tags
 
I was looking for that for months, Thank's!


All times are GMT -4. The time now is 18:10.

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