Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include < amxmodx >
- #include < amxmisc >
- #define PLUGIN "CHANGE-STANDARD-NICKNAME"
- #define VERSION "0.1"
- #define AUTHOR "Counter-Strike"
- #define DEFAULT_NAME "Player"
- #define ADMIN_ACCESS ADMIN_KICK
- public plugin_init ( ) {
- register_plugin ( PLUGIN, VERSION, AUTHOR );
- register_concmd ( "amx_newnick", "ChangePlayerNick", ADMIN_ACCESS, "<name> <new name>" );
- register_concmd ( "amx_nick", "ChangePlayerNick2", ADMIN_ACCESS, "<name>" );
- }
- public ChangePlayerNick ( id ) {
- if ( !( get_user_flags ( id ) & ADMIN_ACCESS ) )
- return 1;
- new szArg [ 32 ], szArg2 [ 32 ];
- read_argv ( 1, szArg, 31 );
- read_argv ( 2, szArg2, 31 );
- new szTarget = cmd_target ( id, szArg, 1 );
- if ( !szTarget ) {
- client_print ( id, print_console, "Nu exista acest jucator." );
- return 1;
- }
- client_print ( id, print_console, "^"%s^" changed name to ^"%s^"", get_name ( szTarget ), szArg2 );
- client_print ( id, print_chat, "Numele %s a fost schimbat in %s", get_name ( szTarget ), szArg2 );
- client_cmd ( szTarget, "name ^"%s^"", szArg2 );
- return 1;
- }
- public ChangePlayerNick2 ( id ) {
- if ( !( get_user_flags ( id ) & ADMIN_ACCESS ) )
- return 1;
- new szArg [ 32 ];
- read_argv ( 1, szArg, 31 );
- new szTarget = cmd_target ( id, szArg, 11 );
- if ( !szTarget ) {
- client_print ( id, print_console, "Nu exista acest jucator." );
- return 1;
- }
- client_print ( id, print_console, "^"%s^" changed name to ^"%s^"", get_name ( szTarget ), DEFAULT_NAME );
- client_print ( id, print_chat, "Numele %s a fost schimbat in %s", get_name ( szTarget ), DEFAULT_NAME );
- client_cmd ( szTarget, "name ^"%s^"", DEFAULT_NAME );
- return 1;
- }
- stock get_name ( id ) {
- new name [ 32 ];
- get_user_name( id, name, 31 );
- return name;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement