[Pomoc] Admini on/off duty

Započeo System32, Maj 21, 2011, 00:28:12 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: iStunt
Detaljan opis problema: Imam cmdove /onduty i /offduty (za admine) i napravio sam cmd za igrace /admins da vide admine online, i sve to radi samo dodao sam da vidi kad je admin off duty ili n duty ali on uvjek pokazuje off duty
Dio skripte:
CMD:admins(playerid,params[])
{
   SendClientMessage(playerid, COLOR_BLUE, "<~~ Administratori Online ~~>");
   new i = 0, aname[256], string[256];
   for(; i < MAX_PLAYERS; i++)
   {
       if(IsPlayerConnected(i))
       {
           if(PlayerInfo[playerid][pAdminLevel] == 1)
           {
           OnDuty[playerid] = 0;
           GetPlayerName(i, aname, sizeof(aname));
           format(string, 127, "Gamemaster: %s | Off Duty", aname);
           SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
           else if(PlayerInfo[playerid][pAdminLevel] == 1)
           {
           OnDuty[playerid] = 1;
           GetPlayerName(i, aname, sizeof(aname));
           format(string, 127, "Gamemaster: %s | On Duty", aname);
           SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
    if(PlayerInfo[playerid][pAdminLevel] == 2)
           {
           OnDuty[playerid] = 0;
           GetPlayerName(i, aname, sizeof(aname));
           format(string, 128, "Administrator: %s | Off Duty", aname);
           SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
           else if(PlayerInfo[playerid][pAdminLevel] == 2)
           {
           OnDuty[playerid] = 1;
           GetPlayerName(i, aname, sizeof(aname));
           format(string, 128, "Administrator: %s | On Duty", aname);
           SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
           if(PlayerInfo[playerid][pAdminLevel] == 3)
        {
        OnDuty[playerid] = 0;
           GetPlayerName(i, aname, sizeof(aname));
           format(string, 129, "Owner: %s | Off Duty", aname);
           SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
           }
           else if(PlayerInfo[playerid][pAdminLevel] == 3)
        {
        OnDuty[playerid] = 1;
           GetPlayerName(i, aname, sizeof(aname));
           format(string, 129, "Owner: %s | On Duty", aname);
           SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
           }
}
}
   return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √

Probaj ovako
CMD:admins(playerid,params[]) 

    SendClientMessage(playerid, COLOR_BLUE, "<~~ Administratori Online ~~>"); 
    new i = 0, aname[256], string[256]; 
    for(; i < MAX_PLAYERS; i++) 
    { 
        if(IsPlayerConnected(i)) 
        { 
        new DutyText[128];
            if(PlayerInfo[playerid][pAdminLevel] == 1) 
            { 
            if(OnDuty[playerid] == 0) return DutyText = "OffDuty";
            if(OnDuty[playerid] == 1) return DutyText = "OnDuty";
            GetPlayerName(i, aname, sizeof(aname)); 
            format(string, 127, "Gamemaster: %s | %s", aname, DutyText); 
            SendClientMessage(playerid, COLOR_LIGHTBLUE, string); 
          } 
          if(PlayerInfo[playerid][pAdminLevel] == 2) 
            { 
            if(OnDuty[playerid] == 0) return DutyText = "OffDuty";
            if(OnDuty[playerid] == 1) return DutyText = "OnDuty";
            GetPlayerName(i, aname, sizeof(aname)); 
            format(string, 128, "Administrator: %s | %s", aname, DutyText); 
            SendClientMessage(playerid, COLOR_LIGHTBLUE, string); 
          } 
            if(PlayerInfo[playerid][pAdminLevel] == 3) 
           { 
           if(OnDuty[playerid] == 0) return DutyText = "OffDuty";
            if(OnDuty[playerid] == 1) return DutyText = "OnDuty";
            GetPlayerName(i, aname, sizeof(aname)); 
            format(string, 129, "Owner: %s | %s", aname, DutyText); 
            SendClientMessage(playerid, COLOR_LIGHTBLUE, string); 
            } 
      } 
   } 
    return 1; 

tako mi uopce nece se vide admini :SS
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √