25.05.2016, 01:58
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; } |