24.06.2015, 15:14
Is that what you need ? :
KillerDVX,
PHP код:
dcmd_name(playerid,params[])
{
new ID;
new newnick[MAX_PLAYER_NAME];
if(sscanf(params, "us", ID, newnick))
{
SendClientMessage(playerid,COLOR_ERROR,"/name [Pseudo/ID] [Name].");
return 1;
}
SetPlayerName(ID,newnick);
GameTextForPlayer(ID,"~r~Name's changed",3000,5);
return 1;
}
dcmd_admins(playerid,params[])
{
#pragma unused params
new string[138];
SendClientMessage(playerid,COLOR_DEADCONNECT,"[ ADMINS ONLINE ]");
SendClientMessage(playerid,COLOR_WHITE,"-------------------------------------------------------------------");
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerAdmin(i))
{
format(string,sizeof(string),"Admin %s(%d) : Admin Level (%d)",PlayerName(i),i,AdminLevel(i)));
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
}
SendClientMessage(playerid,COLOR_WHITE,"-------------------------------------------------------------------");
return 1;
}
stock AdminLevel(targetid)
{
new adlvl[10];
if(PlayerInfo[targetid][pAdmin] == 0) { adlvl = "0"; }
if(PlayerInfo[targetid][pAdmin] == 1) { adlvl = "1"; }
if(PlayerInfo[targetid][pAdmin] == 2) { adlvl = "2"; }
if(PlayerInfo[targetid][pAdmin] == 3) { adlvl = "3"; }
if(PlayerInfo[targetid][pAdmin] == 4) { adlvl = "4"; }
if(PlayerInfo[targetid][pAdmin] == 5) { adlvl = "5"; }
if(PlayerInfo[targetid][pAdmin] == 6) { adlvl = "6"; }
return adlvl;
}