Raised This Month: $ Target: $400
 0% 

Change Nick (TAG)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BloodyNuker
Member
Join Date: Jan 2006
Old 01-14-2007 , 23:45   Change Nick (TAG)
Reply With Quote #1

I have got to put a tag to the players automatically, but when a player have got a number on the nick, or a "." or "/" or.. "(" etc i cant change nick.. this is the code...

Code:
new name[32]; get_user_name(id, name, 31); if(containi(name, "[TAG] - ") > -1)       {     return PLUGIN_HANDLED;       }       else       {     client_cmd(id,"name ^"[TAG] - %s^"",name);       }

If any can help.. cyas
BloodyNuker is offline
s p l i t
Senior Member
Join Date: May 2006
Location: US, NC
Old 01-15-2007 , 00:37   Re: Change Nick (TAG)
Reply With Quote #2

Code:
new name[32], name2[32] get_user_name(id, name, 31) get_user_name(id, name2, 31) if(name[0]!='[' && name[1]!='T' && name[2]!='A' && name[3]!='G' && name[4]!=']'){    client_cmd(id,"name ^"[TAG] - %s^"",name2) }
s p l i t is offline
Send a message via AIM to s p l i t Send a message via MSN to s p l i t
dutchmeat
Senior Member
Join Date: Sep 2006
Old 01-15-2007 , 04:03   Re: Change Nick (TAG)
Reply With Quote #3

I don't get this, you want to check if the players name is like this:
[TAG] - name
and then change it to
[TAG] - name
But that's not the problem, you are using the variable 'name', but 'name' is '[TAG] name'
so you change the name to:
[TAG] - [TAG] - name.
__________________
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
BloodyNuker
Member
Join Date: Jan 2006
Old 01-15-2007 , 11:14   Re: Change Nick (TAG)
Reply With Quote #4

emm I think.. and the problem to detect the name no it is.
The problem is to change name to a player... when this player have got numbers or "$" simbols. Examples with my plugin:

If a player have got name "CAT" the plugin put him:

[TAG] - CAT

If a player have got name "[TAG] - CAT" donīt happend nothing.

If aplayer have got name "110" the plugin put him:

110

Here is the problem.. the plugin canīt put "[TAG] - " & name... i think.. the problem is en the "&"
BloodyNuker is offline
BloodyNuker
Member
Join Date: Jan 2006
Old 01-15-2007 , 11:43   Re: Change Nick (TAG)
Reply With Quote #5

Sorry.. i donīt know why canīt edit the other post :/ (Im logged)

If a player into the server have got name CAT... and the server put him [TAG] - CAT... when a player put him 123, the plugin put him [TAG] - 123...

But if a player have got name 123 when entering in the server, the plugin canīt change the nick.. :S

This is very crazy! OMG

If any donīt know why, and can help.. i post the plugin

Code:
#include <amxmodx> #include <engine> #include <amxmisc> #include <fakemeta> new Plugin_Author[] = "start"; new Plugin_Version[] = "1.0"; new Plugin_Name[] = "lol" public plugin_init() {     register_plugin(Plugin_Name,Plugin_Version,Plugin_Author); } public client_putinserver(id) { set_task(1.0,"fnCheck1",id) } public client_infochanged(id) {             new name[32];                 get_user_name(id, name, 31);             if(containi(name, "[TAG] - ") > -1)                     {                     return PLUGIN_HANDLED;                 }                 else                 {                     client_cmd(id,"name ^"[TAG] - %s^"",name);                 } } public fnCheck1(id) {             new name[32];                 get_user_name(id, name, 31);             if(containi(name, "[TAG] - ") > -1)                     {                     return PLUGIN_HANDLED;                 }                 else                 {                     client_cmd(id,"name ^"[TAG] - %s^"",name);                 } }
BloodyNuker is offline
Reply


Thread Tools
Display Modes

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:23.


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