27.03.2010, 09:26
The title says it all; cmd not working and showing SERVER: Unknown Command.
I hope someone can fix/help.
I hope someone can fix/help.
pawn Код:
dcmd_admins(playerid, params[])
{
#pragma unused params
print("Admins command 1");
new adminscount = 0,string[128],adminName[MAX_PLAYER_NAME];
for(new i=0;i<=MAX_PLAYERS;i++)
if(pInfo[i][pAdmin] > 0 || IsPlayerAdmin(i)) adminscount ++;
if(adminscount == 0) return SendClientMessage(playerid, COLOR_RED, "There is are Adminstrators online.");
SendClientMessage(playerid, COLOR_LIGHTYELLOW, "Admins online:");
print("Admins command 2");
for(new j=0;j<=MAX_PLAYERS;j++)
{
if(pInfo[j][pAdmin] > 0 || IsPlayerAdmin(j))
{
print("Admins command 3");
GetPlayerName(j,adminName,sizeof(adminName));
format(string,sizeof(string),"Admin: %s [Level: %d] [ID: %d].",adminName,pInfo[j][pAdmin],j);
SendClientMessage(playerid, COLOR_GREEN, string);
}
return 0;
}
return 1;
}