25.05.2016, 00:43
Greetings! I need help on creating a /factions command, in which it shows up the faction name, the leader's name and the owner's name. Thanks for the help!
CMD:admins(playerid,params[])
{
SendClientMessage(playerid, vert, "|---------------------- "adminUA"Online Admins"vertU" ----------------------|");
new a;
foreach(new i : Player) // same as for(new i=0; i<MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdminlvl] == 5)
{
a = a+1;
new name[MAX_PLAYER_NAME], str[MAX_PLAYER_NAME+120];
GetPlayerName(i, name, sizeof(name));
format(str, sizeof(str), "[Fondateur] » "blancU"%s", name);
SendClientMessage(playerid, red1, str);
}
else if(PlayerInfo[i][pAdminlvl] == 4)
{
a = a+1;
new name[MAX_PLAYER_NAME], str[MAX_PLAYER_NAME+120];
GetPlayerName(i, name, sizeof(name));
format(str, sizeof(str), mappeur"[Mappeur] » "blancU"%s", name);
SendClientMessage(playerid, X11_STEEL_BLUE_2, str);
}
else if(PlayerInfo[i][pAdminlvl] == 3)
{
new name[MAX_PLAYER_NAME], str[MAX_PLAYER_NAME+120];
GetPlayerName(i, name, sizeof(name));
format(str, sizeof(str), "[Admin] » "blancU"%s", name);
SendClientMessage(playerid, red, str);
a = a+1;
}
else if(PlayerInfo[i][pAdminlvl] > 0)
{
new name[MAX_PLAYER_NAME], str[MAX_PLAYER_NAME+120];
GetPlayerName(i, name, sizeof(name));
format(str, sizeof(str), modooPs"[Modo] » "blancU"%s", name);
SendClientMessage(playerid, -1, str);
a = a+1;
}
}
new str9[120];
format(str9, sizeof(str9), "There are %i admins connected!", a);
SendClientMessage(playerid, X11_LIGHT_YELLOW_3, str9);
SendClientMessage(playerid, vert, "|---------------------------------------------------------------|");
return 1;
}