Raised This Month: $ Target: $400
 0% 

Read players TAG Name


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 01-11-2007 , 20:49   Re: Read players TAG Name
Reply With Quote #3

I was writing this while you found the other post, I'm going to post it anyway

Code:
public checkName() {     new players[32], name[32], tagName[16];     new i, playerCount, player;         tagName = "[TAG]";         get_players(players, playerCount, "ch");  // c is skip bots, h is skip hltv         // Loop through all the players.     for(i = 0; i < playerCount; i++) {         player = players[i];         get_user_name(player, name, 31);                 // Check to see if their name contains the tag.         if(containi(name, tagName) == -1) {             // Run a command on the client to set their name to "[TAG] TheirName"             // Then notify them that their name has been changed to contain the tag.             client_cmd(player, "name ^"%s %s^"", tagName, name);             client_print(player, print_chat, "Your name has been changed to use the clan tag.");         }     }         return PLUGIN_CONTINUE; }

It should work

Last edited by hlstriker; 01-11-2007 at 21:45.
hlstriker is offline
 



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 22:31.


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