17.04.2014, 21:52
pawn Код:
CMD:ksadmins(playerid,params[]){
#pragma unused params
new Count = 0;
new n[MAX_PLAYER_NAME];
new string[1000];
new AdmRank[40];
new ChangeColor;
SendClientMessage(playerid, green, " ");
SendClientMessage(playerid, blue, "___________ |- Online KS Members -| ___________");
SendClientMessage(playerid, green, " ");
for(new i = 0; i < MAX_PLAYERS; 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;
}
}
if(!IsPlayerConnected(i)) continue;
if(PlayerInfo[i][KsLevel] < 1) continue;
GetPlayerName(i,n,sizeof(n));
format(string, 128, "Rank: %d - %s (Id:%i) | %s |", PlayerInfo[i][KsLevel], n, i, AdmRank);
Count++;}
if(Count == 0)
{
SendClientMessage(playerid, red, "no online KS members");
SendClientMessage(playerid, blue, " _______________________________________");
return 1;
}
SendClientMessage(playerid, ChangeColor, string);
SendClientMessage(playerid, blue, " _______________________________________");
return 1;}