AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Nick (https://forums.alliedmods.net/showthread.php?t=117638)

zombieplague 02-03-2010 06:22

Nick
 
How to do i change the person nick ?

SpILL 02-03-2010 06:40

Re: Nick
 
amx_nick "Client Nick To" "My Name Is Nick :)"

zombieplague 02-03-2010 06:55

Re: Nick
 
Quote:

Originally Posted by SpILL (Post 1076929)
amx_nick "Client Nick To" "My Name Is Nick :)"

No i mean like the code not the plugin.

Like client_cmd( id, "name blabla" )

Exolent[jNr] 02-03-2010 07:55

Re: Nick
 
Well thats how. You just posted the code.

zombieplague 02-03-2010 08:14

Re: Nick
 
Quote:

Originally Posted by Exolent[jNr] (Post 1076981)
Well thats how. You just posted the code.

But i have error when compiling

PHP Code:

new name33 ]
get_user_nameidname32 )
 
client_cmdid"name %s | asdasda "name 


crazyeffect 02-03-2010 08:15

Re: Nick
 
Is that your whole code?

zombieplague 02-03-2010 09:48

Re: Nick
 
Quote:

Originally Posted by crazyeffect (Post 1076998)
Is that your whole code?

PHP Code:

#include <amxmodx>
#include <fakemeta>
public plugin_init( )
{
    
register_plugin"Name Info" "1.0""zombieplague" )
    
register_forwardFM_SpectatorThnk"Specting" )
}

public 
Spectingid 
{
    if ( 
user_is_aliveid )
    {
        new 
name33 ]
        
get_user_nameidname32 )
        
        
client_cmdid"name %s | what"name 
    }



Seta00 02-03-2010 09:58

Re: Nick
 
I think you should use set_user_info instead of client_cmd, like this:
PHP Code:

new name[32]
get_user_name(idnamecharsmax(name))
new 
newName[32]
format(newNamecharsmax(newName), "%s | what"name);
set_user_info(id"name"newName

EDIT: And by the way, why name changing isn't considered slow-hacking?

Exolent[jNr] 02-03-2010 10:38

Re: Nick
 
Your error is not with the name changing.

SnoW 02-03-2010 10:46

Re: Nick
 
PHP Code:

FM_SpectatorThnk     - >     FM_SpectatorThink
if ( user_is_aliveid )     - >     if ( is_user_aliveid ) ) 



All times are GMT -4. The time now is 07:29.

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