17.04.2014, 22:14
Try now
pawn Код:
CMD:ksadmins(playerid,params[])
{
new Count=0,n[MAX_PLAYER_NAME],string[128],AdmRank,ChangeColor;
SendClientMessage(playerid, green, " ");
SendClientMessage(playerid, blue, "___________ |- Online KS Members -| ___________");
SendClientMessage(playerid, green, " ");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][KsLevel] > 0 && IsPlayerConnected(i))
{
switch(PlayerInfo[i][KsLevel])
{
case 1:
{
AdmRank = "Newest Member";
ChangeColor = blue;
}
case 2:
{
AdmRank = "Junior Member";
ChangeColor = blue;
}
case 3:
{
AdmRank = "Executive Member";
ChangeColor = blue;
}
case 4:
{
AdmRank = "Senior Member";
ChangeColor = blue;
}
case 5:
{
AdmRank = "Head Member";
ChangeColor = blue;
}
case 6:
{
AdmRank = "Lieutenant";
ChangeColor = blue;
}
case 7:
{
AdmRank = "General";
ChangeColor = blue;
}
case 8:
{
AdmRank = "Leader";
ChangeColor = red;
}
}
GetPlayerName(i,n,sizeof(n));
format(string, 128, "Rank: %d - %s (Id:%i) | %s |", PlayerInfo[i][KsLevel], n, i, AdmRank);
SendClientMessage(playerid, ChangeColor, string);
Count++;
}
}
if(Count == 0)
{
SendClientMessage(playerid, red, "No online KS members");
}
SendClientMessage(playerid, blue, " _______________________________________");
return 1;
}