Jump to content

Ajutor comanda /admins si /aod


PedoB3ar
 Share

Recommended Posts

Salut as vrea ca la comanda /admin sa apara doar admini care sunt on-dutty comenzile le las mai jos !

Multumesc anticipat !

 

CMD:admins(playerid, params[]) {
new string[128], count;
format(string, sizeof(string), "---------------- Admini conectati ----------------");
SendClientMessage(playerid, COLOR_WHITE, string);
if(PlayerInfo[playerid][pAdmin] < 5) {
for(new j=1;j<=7;j++) {
foreach(Player,i) {
if(PlayerInfo[pAdmin] == j && GetPVarInt(i, "Cover") == 0) {
format(string, sizeof(string), "%s %s (%d)", GetAdminRank(i), GetName(i),i);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
}
}
else {
for(new j=1;j<=7;j++) {
foreach(Player,i) {
if(PlayerInfo[pAdmin] == j) {
if(GetPVarInt(i, "Cover") == 1) format(string, sizeof(string), "%s %s (%d) - AFK %d min. (%d sec.) - Cover: %s", GetAdminRank(i), PlayerInfo[pUsername],i, AFKSeconds/60, AFKSeconds, GetName(i));
else if(Spectate != 255) format(string, sizeof(string), "%s %s (%d) - spectator pe %s (%d)", GetAdminRank(i), PlayerInfo[pUsername],i, GetName(Spectate), Spectate);
else format(string, sizeof(string), "%s %s (%d) - AFK %d min. (%d sec.)", GetAdminRank(i), PlayerInfo[pUsername],i, AFKSeconds/60, AFKSeconds);
SendClientMessage(playerid, COLOR_WHITE, string);
count++;
}
}
}
}
format(string, sizeof(string), "{ADFF5C}* Sunt %d admini conectati in acest moment.", count);
SendClientMessage(playerid, COLOR_WHITE, string);
SendClientMessage(playerid, COLOR_WHITE, "--------------------------------------------------------");
return 1;
}
 
stock GetAdminRank(playerid) {
new string[180];
switch(PlayerInfo[playerid][pAdmin]) {
    case 1: string = "Trial Admin";
    case 2: string = "Junior Admin";
    case 3: string = "Moderator";
    case 4: string = "Global Moderator";
    case 5: string = "Coordonator";
    case 6: string = "Owner";
    case 7: string = "Scripter";
}
return string;
}
 
stock GetAdminRank2(admid) {
new string[180];
switch(admid) {
    case 1: string = "Trial Admin";
    case 2: string = "Junior Admin";
    case 3: string = "Moderator";
    case 4: string = "Global Moderator";
    case 5: string = "Coordonator";
    case 6: string = "Owner";
    case 7: string = "Scripter";
}
return string;
}
 
Comanda /aod 
CMD:aod(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] > 0)
    {
        if(AdminDuty[playerid] == 0)
        {
            new sendername[25], string[256];
            AdminDuty[playerid] = 1;
            SetPlayerArmour(playerid, 999);
            SetPlayerHealth(playerid, 999);
            SetPlayerSkin(playerid, 217);
            GetPlayerName(playerid,sendername,sizeof(sendername));
            format(string, sizeof(string), "Administratorul %s  este la datorie, [/report] pentru probleme[ON-DUTY]", sendername);
            SendClientMessageToAll(COLOR_RED, string);
 
        }
        else if(AdminDuty[playerid] == 1)
        {
            new sendername[25], string[256];
            AdminDuty[playerid] = 0;
            SetPlayerArmour(playerid, 0);
            SetPlayerHealth(playerid, 100);
            GetPlayerName(playerid,sendername,sizeof(sendername));
            format(string, sizeof(string), "Administratorul %s nu mai este la datorie. [OFF-DUTY]", sendername);
            SendClientMessageToAll(COLOR_RED, string);
        }
 
 
    }
        return 1;
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.