Raised This Month: $ Target: $400
 0% 

Read players TAG Name


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BloodyNuker
Member
Join Date: Jan 2006
Old 01-11-2007 , 20:16   Read players TAG Name
Reply With Quote #1

Hi, i need cut letters from words, to show the clan TAG for example:

[TAG] - Name1
[TAG] - Name2
If the player donīt have the tag.. for example
Name3, the plugin must put him
[TAG] - Name3

Any can help me?

I donīt know what function need, i think .. i need str(, But i donīt know

:/
BloodyNuker is offline
BloodyNuker
Member
Join Date: Jan 2006
Old 01-11-2007 , 20:37   Re: Read players TAG Name
Reply With Quote #2

I search again and found the solution... plz delet my post, sorry


http://forums.alliedmods.net/showthr...light=clan+tag
BloodyNuker is offline
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
dutchmeat
Senior Member
Join Date: Sep 2006
Old 01-12-2007 , 04:25   Re: Read players TAG Name
Reply With Quote #4

This really just a simple example, this also can't recognize if the name is this: "[tag]playername" plus the most important thing is, you want them to recognize a '[' ']' tag, not '[TAG]' (unless your clanname is called 'tag').
try using a regular expression instead of equal
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat 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 22:31.


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