25.05.2016, 05:36
« Would help if you handed out some code to aid in making this command, but you know, Scripting Help isn't really for making you a command...
But if someone was going to be kind, then they'd need some basis to go on, rather than nothing and guess everything. » - Sew_Suni
Anyway, you can do a loop with which is checking every players's faction with the faction desired.
Like this command, which is similar:
But if someone was going to be kind, then they'd need some basis to go on, rather than nothing and guess everything. » - Sew_Suni
Anyway, you can do a loop with which is checking every players's faction with the faction desired.
Like this command, which is similar:
PHP код:
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;
}