Cerere Modificare Plugin

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
Ykaru
Membru, skill 0
Membru, skill 0
Posts: 27
Joined: 29 Jul 2019, 00:33
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 1 time

29 Oct 2019, 01:29

Salut, acest plugin nu functioneaza in totalitate. Adica Playerii nu-si pot schimba numele, dar cand vreau sa le schimb eu numele cu amx_nick sau comanda care e in plugin de /nick nu funtioneaza, adica apare mesajul ca numele a fost schimbat, dar nu s-a schimbat.
| Afiseaza codul
/*
		by ZeniX aka lucylucy

	V 0.1 - Simple message

	V 0.2 - Colorchat message

	v 0.3 - Added Admin Change namew | amx_nume <vechi> <nou>

*/

#include < amxmodx >
#include < amxmisc >
#include < colorchat >

#define PLUGIN "No Name Change"
#define VERSION "0.3"
#define AUTHOR "ZeniX aka lucylucy"

new const bars[] = "/";

new command[][] =
{
   "/nick"  
};

new FZaccess[] =
{
   ADMIN_SLAY

};

public plugin_init ( ) {

	register_plugin( PLUGIN, VERSION, AUTHOR )

	register_message(get_user_msgid("SayText"), "MessageZeniX");

	register_concmd("amx_nick", "cmdNick", ADMIN_SLAY, "<nume vechi> <nume nou>")
	register_clcmd ("say", "hook_say");

}

public client_infochanged ( id ) {

if (is_user_connected(id )) {

new newname [ 32 ], oldname [ 32 ]
get_user_info( id, "name", newname, 31 )
get_user_name( id, oldname, 31 )

if (!equal(oldname,newname)) {

ColorChat ( id, GREEN, "^x04 Nu ai voie ^x01sa iti schimbi numele ^x04pe server ^x01!");

set_user_info(id,"name",oldname)

	}
}

return PLUGIN_CONTINUE
}

public MessageZeniX ( msgid, dest, receiver ) {

static info [ 64 ];
get_msg_arg_string(2, info, sizeof(info) - 1);

if( !equali(info, "#Cstrike_Name_Change") ) return PLUGIN_CONTINUE;

return PLUGIN_HANDLED;

}

public hook_say(index)
{
   static arg[192], command2[192];
   read_args(arg, charsmax (arg));
	
   if (!arg[0])
      return PLUGIN_CONTINUE;

   remove_quotes(arg[0]);
	
   for (new x; x < sizeof command; x++)
   {
    if(equal(arg, command[x], strlen(command[x])))
    {
     if(get_user_flags(index) & FZaccess[x])
     {
       replace(arg, charsmax(arg), bars, "");
       formatex(command2, charsmax(command2), "amx_%s", arg);
       client_cmd(index, command2);
     }		
     break;
    }
   }	
   return PLUGIN_CONTINUE;
}

public cmdNick(id, level, cid)
{
	if (!cmd_access(id, level, cid, 3))
		return PLUGIN_HANDLED

	new arg1[32], arg2[32], authid[32], name[32], authid2[32], name2[32]

	read_argv(1, arg1, 31)
	read_argv(2, arg2, 31)

	new player = cmd_target(id, arg1, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF)
	
	if (!player)
		return PLUGIN_HANDLED

	get_user_authid(id, authid, 31)
	get_user_name(id, name, 31)
	get_user_authid(player, authid2, 31)
	get_user_name(player, name2, 31)

	client_cmd(player, "name ^"%s^"", arg2)

ColorChat( id, GREEN, "^x04[Admin]^x03 %s^x01 : A schimbat numele ^x03 %s^x01 in^x03 %s", name, name2, arg2);

	console_print(id, "[FZ] Changed nick of %s to %s", name2, arg2)

	return PLUGIN_HANDLED
}
Multumesc anticipat.
Enix
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2554
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 37 times
Been thanked: 388 times
Contact:

29 Oct 2019, 20:15

| Afiseaza codul
/*
		by ZeniX aka lucylucy

	V 0.1 - Simple message

	V 0.2 - Colorchat message

	v 0.3 - Added Admin Change namew | amx_nume <vechi> <nou>

*/

#include < amxmodx >
#include < amxmisc >
#include < colorchat >

#define PLUGIN "No Name Change"
#define VERSION "0.3"
#define AUTHOR "ZeniX aka lucylucy"

new const bars[] = "/";

new command[][] =
{
   "/nick"  
};
new FZaccess[] =
{
   ADMIN_SLAY
};

public plugin_init ( ) {
	register_plugin( PLUGIN, VERSION, AUTHOR )

	register_message(get_user_msgid("SayText"), "MessageZeniX");

	register_concmd("amx_nick", "cmdNick", ADMIN_SLAY, "<nume vechi> <nume nou>")
	register_clcmd ("say", "hook_say");
}

public client_infochanged ( id ) {
	if (is_user_connected(id )) {
		new newname [ 32 ], oldname [ 32 ]
		get_user_info( id, "name", newname, 31 )
		get_user_name( id, oldname, 31 )
		if (!equali(oldname,newname)) {
			ColorChat ( id, GREEN, "^x04 Nu ai voie ^x01sa iti schimbi numele ^x04pe server ^x01!");
			return PLUGIN_HANDLED
		}
	}
	return PLUGIN_CONTINUE
}

public MessageZeniX ( msgid, dest, receiver ) {
	static info [ 64 ];
	get_msg_arg_string(2, info, sizeof(info) - 1);

	if( equali(info, "#Cstrike_Name_Change") ) return PLUGIN_HANDLED

	return PLUGIN_CONTINUE
}

public hook_say(index)
{
   static arg[192], command2[192];
   read_args(arg, charsmax (arg));
	
   if (!arg[0])
      return PLUGIN_CONTINUE;

   remove_quotes(arg[0]);
	
   for (new x; x < sizeof command; x++)
   {
    if(equal(arg, command[x], strlen(command[x])))
    {
     if(get_user_flags(index) & FZaccess[x])
     {
       replace(arg, charsmax(arg), bars, "");
       formatex(command2, charsmax(command2), "amx_%s", arg);
       client_cmd(index, command2);
     }		
     break;
    }
   }	
   return PLUGIN_CONTINUE;
}

public cmdNick(id, level, cid)
{
	if (!cmd_access(id, level, cid, 3))
		return PLUGIN_HANDLED

	new arg1[32], arg2[32], authid[32], name[32], authid2[32], name2[32]

	read_argv(1, arg1, 31)
	read_argv(2, arg2, 31)

	new player = cmd_target(id, arg1, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF)
	
	if (!player)
		return PLUGIN_HANDLED

	get_user_authid(id, authid, 31)
	get_user_name(id, name, 31)
	get_user_authid(player, authid2, 31)
	get_user_name(player, name2, 31)

	set_user_info(player, "name",arg2)

	ColorChat( id, GREEN, "^x04[Admin]^x03 %s^x01 : A schimbat numele ^x03 %s^x01 in^x03 %s", name, name2, arg2);

	console_print(id, "[FZ] Changed nick of %s to %s", name2, arg2)

	return PLUGIN_HANDLED
}
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
În cazul în care utilizați ceva din addonsurile postate de mine aici, e bine să fiți la curent cu modificările aduse unor plugine, aici.
Ykaru
Membru, skill 0
Membru, skill 0
Posts: 27
Joined: 29 Jul 2019, 00:33
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 1 time

29 Oct 2019, 23:37

L E V I N wrote:
29 Oct 2019, 20:15
| Afiseaza codul
/*
		by ZeniX aka lucylucy

	V 0.1 - Simple message

	V 0.2 - Colorchat message

	v 0.3 - Added Admin Change namew | amx_nume <vechi> <nou>

*/

#include < amxmodx >
#include < amxmisc >
#include < colorchat >

#define PLUGIN "No Name Change"
#define VERSION "0.3"
#define AUTHOR "ZeniX aka lucylucy"

new const bars[] = "/";

new command[][] =
{
   "/nick"  
};
new FZaccess[] =
{
   ADMIN_SLAY
};

public plugin_init ( ) {
	register_plugin( PLUGIN, VERSION, AUTHOR )

	register_message(get_user_msgid("SayText"), "MessageZeniX");

	register_concmd("amx_nick", "cmdNick", ADMIN_SLAY, "<nume vechi> <nume nou>")
	register_clcmd ("say", "hook_say");
}

public client_infochanged ( id ) {
	if (is_user_connected(id )) {
		new newname [ 32 ], oldname [ 32 ]
		get_user_info( id, "name", newname, 31 )
		get_user_name( id, oldname, 31 )
		if (!equali(oldname,newname)) {
			ColorChat ( id, GREEN, "^x04 Nu ai voie ^x01sa iti schimbi numele ^x04pe server ^x01!");
			return PLUGIN_HANDLED
		}
	}
	return PLUGIN_CONTINUE
}

public MessageZeniX ( msgid, dest, receiver ) {
	static info [ 64 ];
	get_msg_arg_string(2, info, sizeof(info) - 1);

	if( equali(info, "#Cstrike_Name_Change") ) return PLUGIN_HANDLED

	return PLUGIN_CONTINUE
}

public hook_say(index)
{
   static arg[192], command2[192];
   read_args(arg, charsmax (arg));
	
   if (!arg[0])
      return PLUGIN_CONTINUE;

   remove_quotes(arg[0]);
	
   for (new x; x < sizeof command; x++)
   {
    if(equal(arg, command[x], strlen(command[x])))
    {
     if(get_user_flags(index) & FZaccess[x])
     {
       replace(arg, charsmax(arg), bars, "");
       formatex(command2, charsmax(command2), "amx_%s", arg);
       client_cmd(index, command2);
     }		
     break;
    }
   }	
   return PLUGIN_CONTINUE;
}

public cmdNick(id, level, cid)
{
	if (!cmd_access(id, level, cid, 3))
		return PLUGIN_HANDLED

	new arg1[32], arg2[32], authid[32], name[32], authid2[32], name2[32]

	read_argv(1, arg1, 31)
	read_argv(2, arg2, 31)

	new player = cmd_target(id, arg1, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF)
	
	if (!player)
		return PLUGIN_HANDLED

	get_user_authid(id, authid, 31)
	get_user_name(id, name, 31)
	get_user_authid(player, authid2, 31)
	get_user_name(player, name2, 31)

	set_user_info(player, "name",arg2)

	ColorChat( id, GREEN, "^x04[Admin]^x03 %s^x01 : A schimbat numele ^x03 %s^x01 in^x03 %s", name, name2, arg2);

	console_print(id, "[FZ] Changed nick of %s to %s", name2, arg2)

	return PLUGIN_HANDLED
}
Acum pot sa le schimb numele, dar si ei pot sa-si schimbe numele pe server.
Eu vreau ca ei sa nu-si poata schimba numele pe server, decat daca ai comanda amx_nick.
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2554
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 37 times
Been thanked: 388 times
Contact:

29 Oct 2019, 23:56

| Afiseaza codul
/*
		by ZeniX aka lucylucy

	V 0.1 - Simple message

	V 0.2 - Colorchat message

	v 0.3 - Added Admin Change namew | amx_nume <vechi> <nou>

*/

#include < amxmodx >
#include < amxmisc >
#include < colorchat >

#define PLUGIN "No Name Change"
#define VERSION "0.3"
#define AUTHOR "ZeniX aka lucylucy"

new const bars[] = "/";

new command[][] =
{
   "/nick"  
};
new FZaccess[] =
{
   ADMIN_SLAY
};

public plugin_init ( ) {
	register_plugin( PLUGIN, VERSION, AUTHOR )

	register_message(get_user_msgid("SayText"), "MessageZeniX");

	register_concmd("amx_nick", "cmdNick", ADMIN_SLAY, "<nume vechi> <nume nou>")
	register_clcmd ("say", "hook_say");
}

public client_infochanged ( id ) {
	if (is_user_connected(id )) {
		new newname [ 32 ], oldname [ 32 ]
		get_user_info( id, "name", newname, 31 )
		get_user_name( id, oldname, 31 )
		if (!equali(oldname,newname)&&!(get_user_flags(id)&ADMIN_KICK)) {
			ColorChat ( id, GREEN, "^x04 Nu ai voie ^x01sa iti schimbi numele ^x04pe server ^x01!");
			set_user_info(id,"name",oldname)
			return PLUGIN_HANDLED
		}
	}
	return PLUGIN_CONTINUE
}

public MessageZeniX ( msgid, dest, receiver ) {
	static info [ 64 ];
	get_msg_arg_string(2, info, sizeof(info) - 1);

	if( equali(info, "#Cstrike_Name_Change") ) return PLUGIN_HANDLED

	return PLUGIN_CONTINUE
}

public hook_say(index)
{
   static arg[192], command2[192];
   read_args(arg, charsmax (arg));
	
   if (!arg[0])
      return PLUGIN_CONTINUE;

   remove_quotes(arg[0]);
	
   for (new x; x < sizeof command; x++)
   {
    if(equal(arg, command[x], strlen(command[x])))
    {
     if(get_user_flags(index) & FZaccess[x])
     {
       replace(arg, charsmax(arg), bars, "");
       formatex(command2, charsmax(command2), "amx_%s", arg);
       client_cmd(index, command2);
     }		
     break;
    }
   }	
   return PLUGIN_CONTINUE;
}

public cmdNick(id, level, cid)
{
	if (!cmd_access(id, level, cid, 3))
		return PLUGIN_HANDLED

	new arg1[32], arg2[32], authid[32], name[32], authid2[32], name2[32]

	read_argv(1, arg1, 31)
	read_argv(2, arg2, 31)

	new player = cmd_target(id, arg1, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF)
	
	if (!player)
		return PLUGIN_HANDLED

	get_user_authid(id, authid, 31)
	get_user_name(id, name, 31)
	get_user_authid(player, authid2, 31)
	get_user_name(player, name2, 31)

	set_user_info(player, "name",arg2)

	ColorChat( id, GREEN, "^x04[Admin]^x03 %s^x01 : A schimbat numele ^x03 %s^x01 in^x03 %s", name, name2, arg2);

	console_print(id, "[FZ] Changed nick of %s to %s", name2, arg2)

	return PLUGIN_HANDLED
}
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
În cazul în care utilizați ceva din addonsurile postate de mine aici, e bine să fiți la curent cu modificările aduse unor plugine, aici.
Ykaru
Membru, skill 0
Membru, skill 0
Posts: 27
Joined: 29 Jul 2019, 00:33
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 1 time

30 Oct 2019, 00:38

L E V I N wrote:
29 Oct 2019, 23:56
| Afiseaza codul
/*
		by ZeniX aka lucylucy

	V 0.1 - Simple message

	V 0.2 - Colorchat message

	v 0.3 - Added Admin Change namew | amx_nume <vechi> <nou>

*/

#include < amxmodx >
#include < amxmisc >
#include < colorchat >

#define PLUGIN "No Name Change"
#define VERSION "0.3"
#define AUTHOR "ZeniX aka lucylucy"

new const bars[] = "/";

new command[][] =
{
   "/nick"  
};
new FZaccess[] =
{
   ADMIN_SLAY
};

public plugin_init ( ) {
	register_plugin( PLUGIN, VERSION, AUTHOR )

	register_message(get_user_msgid("SayText"), "MessageZeniX");

	register_concmd("amx_nick", "cmdNick", ADMIN_SLAY, "<nume vechi> <nume nou>")
	register_clcmd ("say", "hook_say");
}

public client_infochanged ( id ) {
	if (is_user_connected(id )) {
		new newname [ 32 ], oldname [ 32 ]
		get_user_info( id, "name", newname, 31 )
		get_user_name( id, oldname, 31 )
		if (!equali(oldname,newname)&&!(get_user_flags(id)&ADMIN_KICK)) {
			ColorChat ( id, GREEN, "^x04 Nu ai voie ^x01sa iti schimbi numele ^x04pe server ^x01!");
			set_user_info(id,"name",oldname)
			return PLUGIN_HANDLED
		}
	}
	return PLUGIN_CONTINUE
}

public MessageZeniX ( msgid, dest, receiver ) {
	static info [ 64 ];
	get_msg_arg_string(2, info, sizeof(info) - 1);

	if( equali(info, "#Cstrike_Name_Change") ) return PLUGIN_HANDLED

	return PLUGIN_CONTINUE
}

public hook_say(index)
{
   static arg[192], command2[192];
   read_args(arg, charsmax (arg));
	
   if (!arg[0])
      return PLUGIN_CONTINUE;

   remove_quotes(arg[0]);
	
   for (new x; x < sizeof command; x++)
   {
    if(equal(arg, command[x], strlen(command[x])))
    {
     if(get_user_flags(index) & FZaccess[x])
     {
       replace(arg, charsmax(arg), bars, "");
       formatex(command2, charsmax(command2), "amx_%s", arg);
       client_cmd(index, command2);
     }		
     break;
    }
   }	
   return PLUGIN_CONTINUE;
}

public cmdNick(id, level, cid)
{
	if (!cmd_access(id, level, cid, 3))
		return PLUGIN_HANDLED

	new arg1[32], arg2[32], authid[32], name[32], authid2[32], name2[32]

	read_argv(1, arg1, 31)
	read_argv(2, arg2, 31)

	new player = cmd_target(id, arg1, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF)
	
	if (!player)
		return PLUGIN_HANDLED

	get_user_authid(id, authid, 31)
	get_user_name(id, name, 31)
	get_user_authid(player, authid2, 31)
	get_user_name(player, name2, 31)

	set_user_info(player, "name",arg2)

	ColorChat( id, GREEN, "^x04[Admin]^x03 %s^x01 : A schimbat numele ^x03 %s^x01 in^x03 %s", name, name2, arg2);

	console_print(id, "[FZ] Changed nick of %s to %s", name2, arg2)

	return PLUGIN_HANDLED
}
Acum nu poate sa-si schimbe numele, dar nici adminii nu pot sa-i schimbe cu acea comanda.
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2554
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 37 times
Been thanked: 388 times
Contact:

30 Oct 2019, 14:20

| Afiseaza codul
/*
		by ZeniX aka lucylucy

	V 0.1 - Simple message

	V 0.2 - Colorchat message

	v 0.3 - Added Admin Change namew | amx_nume <vechi> <nou>

*/

#include < amxmodx >
#include < amxmisc >
#include < colorchat >

#define PLUGIN "No Name Change"
#define VERSION "0.3"
#define AUTHOR "ZeniX aka lucylucy"

new const bars[] = "/";

new command[][] =
{
   "/nick"  
};
new FZaccess[] =
{
   ADMIN_SLAY
};

new bool:***[33]

public plugin_init ( ) {
	register_plugin( PLUGIN, VERSION, AUTHOR )

	register_message(get_user_msgid("SayText"), "MessageZeniX");

	register_concmd("amx_nick", "cmdNick", ADMIN_SLAY, "<nume vechi> <nume nou>")
	register_clcmd ("say", "hook_say");
}

public client_infochanged ( id ) {
	if (is_user_connected(id )) {
		new newname [ 32 ], oldname [ 32 ]
		get_user_info( id, "name", newname, 31 )
		get_user_name( id, oldname, 31 )
		if (!equali(oldname,newname)&&!((get_user_flags(id)&ADMIN_KICK)||***[id])) {
			ColorChat ( id, GREEN, "^x04 Nu ai voie ^x01sa iti schimbi numele ^x04pe server ^x01!");
			set_user_info(id,"name",oldname)
			return PLUGIN_HANDLED
		}
	}
	return PLUGIN_CONTINUE
}

public MessageZeniX ( msgid, dest, receiver ) {
	static info [ 64 ];
	get_msg_arg_string(2, info, sizeof(info) - 1);

	if( equali(info, "#Cstrike_Name_Change") ) return PLUGIN_HANDLED

	return PLUGIN_CONTINUE
}

public hook_say(index)
{
   static arg[192], command2[192];
   read_args(arg, charsmax (arg));
	
   if (!arg[0])
      return PLUGIN_CONTINUE;

   remove_quotes(arg[0]);
	
   for (new x; x < sizeof command; x++)
   {
    if(equal(arg, command[x], strlen(command[x])))
    {
     if(get_user_flags(index) & FZaccess[x])
     {
       replace(arg, charsmax(arg), bars, "");
       formatex(command2, charsmax(command2), "amx_%s", arg);
       client_cmd(index, command2);
     }		
     break;
    }
   }	
   return PLUGIN_CONTINUE;
}

public cmdNick(id, level, cid)
{
	if (!cmd_access(id, level, cid, 3))
		return PLUGIN_HANDLED

	new arg1[32], arg2[32], authid[32], name[32], authid2[32], name2[32]

	read_argv(1, arg1, 31)
	read_argv(2, arg2, 31)

	new player = cmd_target(id, arg1, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF)
	
	if (!player)
		return PLUGIN_HANDLED

	get_user_authid(id, authid, 31)
	get_user_name(id, name, 31)
	get_user_authid(player, authid2, 31)
	get_user_name(player, name2, 31)

	set_user_info(player, "name",arg2)
	***[player]=true

	ColorChat( id, GREEN, "^x04[Admin]^x03 %s^x01 : A schimbat numele ^x03 %s^x01 in^x03 %s", name, name2, arg2);

	console_print(id, "[FZ] Changed nick of %s to %s", name2, arg2)

	return PLUGIN_HANDLED
}
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
În cazul în care utilizați ceva din addonsurile postate de mine aici, e bine să fiți la curent cu modificările aduse unor plugine, aici.
Ykaru
Membru, skill 0
Membru, skill 0
Posts: 27
Joined: 29 Jul 2019, 00:33
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 1 time

31 Oct 2019, 20:08

L E V I N wrote:
30 Oct 2019, 14:20
| Afiseaza codul
/*
		by ZeniX aka lucylucy

	V 0.1 - Simple message

	V 0.2 - Colorchat message

	v 0.3 - Added Admin Change namew | amx_nume <vechi> <nou>

*/

#include < amxmodx >
#include < amxmisc >
#include < colorchat >

#define PLUGIN "No Name Change"
#define VERSION "0.3"
#define AUTHOR "ZeniX aka lucylucy"

new const bars[] = "/";

new command[][] =
{
   "/nick"  
};
new FZaccess[] =
{
   ADMIN_SLAY
};

new bool:***[33]

public plugin_init ( ) {
	register_plugin( PLUGIN, VERSION, AUTHOR )

	register_message(get_user_msgid("SayText"), "MessageZeniX");

	register_concmd("amx_nick", "cmdNick", ADMIN_SLAY, "<nume vechi> <nume nou>")
	register_clcmd ("say", "hook_say");
}

public client_infochanged ( id ) {
	if (is_user_connected(id )) {
		new newname [ 32 ], oldname [ 32 ]
		get_user_info( id, "name", newname, 31 )
		get_user_name( id, oldname, 31 )
		if (!equali(oldname,newname)&&!((get_user_flags(id)&ADMIN_KICK)||***[id])) {
			ColorChat ( id, GREEN, "^x04 Nu ai voie ^x01sa iti schimbi numele ^x04pe server ^x01!");
			set_user_info(id,"name",oldname)
			return PLUGIN_HANDLED
		}
	}
	return PLUGIN_CONTINUE
}

public MessageZeniX ( msgid, dest, receiver ) {
	static info [ 64 ];
	get_msg_arg_string(2, info, sizeof(info) - 1);

	if( equali(info, "#Cstrike_Name_Change") ) return PLUGIN_HANDLED

	return PLUGIN_CONTINUE
}

public hook_say(index)
{
   static arg[192], command2[192];
   read_args(arg, charsmax (arg));
	
   if (!arg[0])
      return PLUGIN_CONTINUE;

   remove_quotes(arg[0]);
	
   for (new x; x < sizeof command; x++)
   {
    if(equal(arg, command[x], strlen(command[x])))
    {
     if(get_user_flags(index) & FZaccess[x])
     {
       replace(arg, charsmax(arg), bars, "");
       formatex(command2, charsmax(command2), "amx_%s", arg);
       client_cmd(index, command2);
     }		
     break;
    }
   }	
   return PLUGIN_CONTINUE;
}

public cmdNick(id, level, cid)
{
	if (!cmd_access(id, level, cid, 3))
		return PLUGIN_HANDLED

	new arg1[32], arg2[32], authid[32], name[32], authid2[32], name2[32]

	read_argv(1, arg1, 31)
	read_argv(2, arg2, 31)

	new player = cmd_target(id, arg1, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF)
	
	if (!player)
		return PLUGIN_HANDLED

	get_user_authid(id, authid, 31)
	get_user_name(id, name, 31)
	get_user_authid(player, authid2, 31)
	get_user_name(player, name2, 31)

	set_user_info(player, "name",arg2)
	***[player]=true

	ColorChat( id, GREEN, "^x04[Admin]^x03 %s^x01 : A schimbat numele ^x03 %s^x01 in^x03 %s", name, name2, arg2);

	console_print(id, "[FZ] Changed nick of %s to %s", name2, arg2)

	return PLUGIN_HANDLED
}
Asta primesc la compilare.
| Afiseaza codul
amx_nick.sma(31) : error 020: invalid symbol name ""
amx_nick.sma(47) : error 029: invalid expression, assumed zero
amx_nick.sma(47) : warning 215: expression has no effect
amx_nick.sma(47) : error 001: expected token: ";", but found "]"
amx_nick.sma(47) : error 029: invalid expression, assumed zero
amx_nick.sma(47) : fatal error 107: too many error messages on one line
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2554
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 37 times
Been thanked: 388 times
Contact:

01 Nov 2019, 00:20

a fost cenzurat codu:)))
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
În cazul în care utilizați ceva din addonsurile postate de mine aici, e bine să fiți la curent cu modificările aduse unor plugine, aici.
Ykaru
Membru, skill 0
Membru, skill 0
Posts: 27
Joined: 29 Jul 2019, 00:33
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 1 time

01 Nov 2019, 22:19

Am rezolvat, multumesc.
Post Reply

Return to “Modificari pluginuri”

  • Information