Raised This Month: $ Target: $400
 0% 

can't change players name...??


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Enigmaya
Member
Join Date: Aug 2005
Old 08-21-2005 , 15:51   can't change players name...??
Reply With Quote #1

i want to add userid before player's name, like this " #12 abc",

and add new userid before the oldname if some reconnect the server.

but there is a bizarrerie problem .

i want to change player's name in the functions of client_connect .

and there are 2 part will change name in the functions .

but one of them can't work ,(no error and warning in compiling),

So i add 2 display sentence before and after the

" client_cmd(id, "name ^"%s^"",name) " ,

find this sentence didn't work.

i don't know it......one of them work fine,and another didn't work...

...why??? Also no error, what can i do ???

work on cs 1.5

code:
============================

public client_connect(id)
{
if ( !get_cvar_num("amx_idname") )
return PLUGIN_HANDLED

if( !is_user_bot(id) )
{
get_user_ip ( id, ip_str, 15, 1 )
for(new x=0 ;x<50;x++)
{
if( equali(ip[x],ip_str) )
{
uid=get_user_userid ( id )
format(name, 31, "#%i %s", uid,ip_name[x])
client_cmd(id, "name ^"%s^"",name) //**********problem
return PLUGIN_HANDLED
}
}
get_user_info(id,"name",oldname,31)
copy(ip_name[id],32,oldname)
copy(ip[id],15,ip_str)
}

if( !is_user_admin(id) )
{
uid=get_user_userid ( id )
format(name, 31, "#%i %s", uid,oldname)
client_cmd(id, "name ^"%s^"", name)//-------------work fine
}

return PLUGIN_HANDLED
}
==============================


this is my first time write amxx plugins.

thank you for you help .
Enigmaya is offline
Send a message via MSN to Enigmaya
 


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 14:35.


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