Raised This Month: $ Target: $400
 0% 

name prefix


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sandro Gubeladze
Senior Member
Join Date: Dec 2009
Location: MySQL DataBase
Old 12-29-2009 , 07:19   name prefix
Reply With Quote #1

hey, I wanted to create plugin which will add prefix to client's name.
example: player conects to the server whose name is "NAME", and his name will be changed into "[player] NAME"
I tried this code but did't help:

PHP Code:
public client_connect(id) {
      new 
name[32]
      
get_user_name(idname31)
      
client_cmd(idname, ^"[player] %s^"name)

Sandro Gubeladze is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 12-29-2009 , 09:42   Re: name prefix
Reply With Quote #2

Code:
client_cmd(id,"name ^"[player] %s^"",name)
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 12-29-2009 , 10:33   Re: name prefix
Reply With Quote #3

or

PHP Code:
public client_connect(id)

      new 
szName[32], szNameFinal[32
      
get_user_name(idszNamecharsmax(szName)) 
      
format(szNameFinal,charsmax(szNameFinal),"[Player] ^"%s^"",szName)
      
set_user_info(id,"name",szNameFinal)

__________________
Find my plugins here..

Ex - Spanish Moderator.
Starsailor is offline
Sandro Gubeladze
Senior Member
Join Date: Dec 2009
Location: MySQL DataBase
Old 12-29-2009 , 11:46   Re: name prefix
Reply With Quote #4

thanks guys (i have to wait 24 hours to give karma )
Sandro Gubeladze is offline
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 12-29-2009 , 13:08   Re: name prefix
Reply With Quote #5

Mmm i have a question.. If you change a name when a client connects to you server, is not slowhacking?
Should not change the name when it disconnects?
Mxnn is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-29-2009 , 19:07   Re: name prefix
Reply With Quote #6

I wrote this a few times Here is one.

Quote:
Originally Posted by Mxnn View Post
Mmm i have a question.. If you change a name when a client connects to you server, is not slowhacking?
Should not change the name when it disconnects?
Technically yes. But, if you use set_user_info() like myself and starsailor then it is not.
__________________
fysiks is offline
Sandro Gubeladze
Senior Member
Join Date: Dec 2009
Location: MySQL DataBase
Old 12-30-2009 , 11:42   Re: name prefix
Reply With Quote #7

is it slowhacking if everyone's name starts with one word ?
Sandro Gubeladze is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-30-2009 , 11:44   Re: name prefix
Reply With Quote #8

Quote:
Originally Posted by Sandro Gubeladze View Post
is it slowhacking if everyone's name starts with one word ?
If you change it on the client, yes.
__________________
fysiks is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 12-30-2009 , 13:41   Re: name prefix
Reply With Quote #9

Quote:
Originally Posted by Starsailor View Post
or

PHP Code:
public client_connect(id)

      new 
szName[32], szNameFinal[32
      
get_user_name(idszNamecharsmax(szName)) 
      
format(szNameFinal,charsmax(szNameFinal),"[Player] ^"%s^"",szName)
      
set_user_info(id,"name",szNameFinal)

Or without "szNameFInal"
__________________

anakin_cstrike 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 04:07.


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