help in this cmds ty
#3

This is command for admin only, admin level 2, u can edit it... using zcmd.inc
Quote:

CMD:changename(playerid, params[])
{
new targetid,name[128];
if(PInfo[playerid][Level] < 2 || !IsPlayerAdmin(playerid)) return 0;
else if (sscanf(params,"us",targetid,name))SendClientMessa ge(playerid,RED,"Usage: /changename [Playerid] [New name]");
else if(!IsPlayerConnected(targetid))SendClientMessage( playerid,RED,"Error: Player is not connected!");
else {
new string[128],n[MAX_PLAYER_NAME];
GetPlayerName(targetid,n,sizeof(n));
SetPlayerName(targetid,name);
format(string,sizeof(string),"Admin %s [ID:%d] Has set %s [ID:%d] name to %s",Name(playerid),playerid,n,targetid,name);
SendClientMessageToAll(YELLOW,string);
format(string,sizeof(string),"Your Name has been set to %s by Admin %s[ID:%d]",Name(targetid),n,playerid);
SendClientMessage(playerid,GREEN,string);
}
return 1;
}

Reply


Messages In This Thread
help in this cmds ty - by Warnin - 25.05.2016, 01:41
Re: help in this cmds ty - by ShadowTeam - 25.05.2016, 01:47
Re: help in this cmds ty - by ShadowTeam - 25.05.2016, 01:58
Re: help in this cmds ty - by Warnin - 25.05.2016, 02:05
Re: help in this cmds ty - by Warnin - 25.05.2016, 02:08
Re: help in this cmds ty - by ShadowTeam - 25.05.2016, 02:13
Re: help in this cmds ty - by Warnin - 25.05.2016, 02:26
Re: help in this cmds ty - by Warnin - 25.05.2016, 10:06
Re: help in this cmds ty - by Amunra - 25.05.2016, 10:31
Re: help in this cmds ty - by TheseMan - 25.05.2016, 10:32

Forum Jump:


Users browsing this thread: 2 Guest(s)