[Pomoc] oko komande /lideri

Započeo Nemanja King, April 18, 2011, 17:47:37 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

napravio sam novu organizaciju,sve lepo radi i kada kucam /lider ne pise mi da sam lider te organizacije..
evo i komanda /lideri

if (strcmp(cmd, "/lideri", true) == 0)
   {
        if(IsPlayerConnected(playerid))
       {
           SendClientMessage(playerid, COLOR_RED, " ");
           SendClientMessage(playerid, COLOR_RED, "-| LIDERI |-");
         foreach (Player, i)
         {
            if(PlayerInfo[pLeader] >= 1 && PlayerInfo[pLeader] < 17)
             {
                new admtext[64];
                 if(PlayerInfo[pLeader] == 1) { admtext = "LS PD"; }
                 else if(PlayerInfo[pLeader] == 2) { admtext = "FBI"; }
                else if(PlayerInfo[pLeader] == 3) { admtext = "SWAT"; }
                else if(PlayerInfo[pLeader] == 4) { admtext = "Hitna Pomoc"; }
                else if(PlayerInfo[pLeader] == 5) { admtext = "Yakuza"; }
               else if(PlayerInfo[pLeader] == 6) { admtext = "LCN"; }
               else if(PlayerInfo[pLeader] == 7) { admtext = "Gradonacelnik"; }
               else if(PlayerInfo[pLeader] == 8) { admtext = "Hitman"; }
               else if(PlayerInfo[pLeader] == 9) { admtext = "Novinari"; }
               else if(PlayerInfo[pLeader] == 10) { admtext = "Taxi ORG"; }
               else if(PlayerInfo[pLeader] == 11) { admtext = "SF PD"; }
               else if(PlayerInfo[pLeader] == 12) { admtext = "Ruska Mafija"; }
               else if(PlayerInfo[pLeader] == 13) { admtext = "------------"; }
               else if(PlayerInfo[pLeader] == 14) { admtext = "------------"; }
               else if(PlayerInfo[pLeader] == 15) { admtext = "Crips"; }
               else if(PlayerInfo[pLeader] == 16) { admtext = "Bloods"; }
               else { admtext = "------------"; }
               GetPlayerName(i, sendername, sizeof(sendername));
               if(AdminDuty == 0)
               {
                  format(string, 256, "%s ( %s )", sendername, admtext);
                  SendClientMessage(playerid, COLOR_WHITE, string);
               }
               else
               {
                   format(string, 256, "%s ( %s )", sendername, admtext);
                  SendClientMessage(playerid, COLOR_YELLOW, string);
               }
            }
         }
      }
      return 1;
   }

Kontakt
Skype nemanja.lazarevic.567
XFire kingsamp
Mystic World Community
Server Address 176.104.106.8 :5555

Kod: c
if(strcmp(cmd, "/leaderi", true) == 0 || strcmp(cmd, "/lideri", true) == 0)
	{
        if(IsPlayerConnected(playerid))
	    {
			SendClientMessage(playerid, COLOR_NICERED, "_______Online Lideri ________");
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i))
				{
				    if(PlayerInfo[i][pLeader] == 1)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "Policija: %s", sendername);
						SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					}
                			else if(PlayerInfo[i][pLeader] == 2)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "FBI: %s", sendername);
						SendClientMessage(playerid, COLOR_DBLUE, string);
					}
                			else if(PlayerInfo[i][pLeader] == 3)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "Specijalne jedinice: %s", sendername);
						SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					}
                			else if(PlayerInfo[i][pLeader] == 4)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "Bolnica: %s", sendername);
						SendClientMessage(playerid, COLOR_PINK, string);
					}
				        	else if(PlayerInfo[i][pLeader] == 5)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "Yakuza: %s", sendername);
						SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
					}
    					    else if(PlayerInfo[i][pLeader] == 6)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "{0E0101}Hitman: %s", sendername);
						SendClientMessage(playerid, COLOR_GREEN, string);
					}
					        else if(PlayerInfo[i][pLeader] == 8)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "GSF: %s", sendername);
						SendClientMessage(playerid, COLOR_GREEN, string);
					}
				            else if(PlayerInfo[i][pLeader] == 9)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "LCN: %s", sendername);
						SendClientMessage(playerid, COLOR_WHITE, string);
					}
				}
			}
		}
		return 1;
	}



Samo promijenis broj organizacije, tj. ID i naziv te organizacije

kada tvoju komandu ubacim,i kada kucam /lideri pojavi mi se da sam lider i lcn-a i blods i groove..a ne samo jedne organizacije koje sam lider

Kontakt
Skype nemanja.lazarevic.567
XFire kingsamp
Mystic World Community
Server Address 176.104.106.8 :5555

Jesi li tu org dodao ispod zadnje org,tj :

else if(PlayerInfo[pLeader] == 16) { admtext = "Bloods"; }



i povecao sa:

f(PlayerInfo[pLeader] >= 1 && PlayerInfo[pLeader] < 17)


na :

f(PlayerInfo[pLeader] >= 1 && PlayerInfo[pLeader] < 18)

nece brate..evo napravio sam ovako

if (strcmp(cmd, "/lideri", true) == 0)
   {
        if(IsPlayerConnected(playerid))
       {
           SendClientMessage(playerid, COLOR_RED, " ");
           SendClientMessage(playerid, COLOR_RED, "-| LIDERI |-");
         foreach (Player, i)
         {
            if(PlayerInfo[pLeader] >= 1 && PlayerInfo[pLeader] < 18)
             {
                new admtext[64];
                 if(PlayerInfo[pLeader] == 1) { admtext = "LS PD"; }
                 else if(PlayerInfo[pLeader] == 2) { admtext = "FBI"; }
                else if(PlayerInfo[pLeader] == 3) { admtext = "SWAT"; }
                else if(PlayerInfo[pLeader] == 4) { admtext = "Hitna Pomoc"; }
                else if(PlayerInfo[pLeader] == 5) { admtext = "Yakuza"; }
               else if(PlayerInfo[pLeader] == 6) { admtext = "LCN"; }
               else if(PlayerInfo[pLeader] == 7) { admtext = "Gradonacelnik"; }
               else if(PlayerInfo[pLeader] == 8) { admtext = "Hitman"; }
               else if(PlayerInfo[pLeader] == 9) { admtext = "Novinari"; }
               else if(PlayerInfo[pLeader] == 10) { admtext = "Taxi ORG"; }
               else if(PlayerInfo[pLeader] == 11) { admtext = "SF PD"; }
               else if(PlayerInfo[pLeader] == 12) { admtext = "Ruska Mafija"; }
               else if(PlayerInfo[pLeader] == 13) { admtext = "------------"; }
               else if(PlayerInfo[pLeader] == 14) { admtext = "------------"; }
               else if(PlayerInfo[pLeader] == 15) { admtext = "Crips"; }
               else if(PlayerInfo[pLeader] == 16) { admtext = "Bloods"; }
               else if(PlayerInfo[pLeader] == 17) { admtext = "------------"; }
               else if(PlayerInfo[pLeader] == 18) { admtext = "Terrors"; }
               else { admtext = "------------"; }
               GetPlayerName(i, sendername, sizeof(sendername));
               if(AdminDuty == 0)
               {
                  format(string, 256, "%s ( %s )", sendername, admtext);
                  SendClientMessage(playerid, COLOR_WHITE, string);
               }
               else
               {
                   format(string, 256, "%s ( %s )", sendername, admtext);
                  SendClientMessage(playerid, COLOR_YELLOW, string);
               }
            }
         }
      }
      return 1;
   }

i usao na srv i nece.samo pise lideri a ne pise da sam lider organizacije terrors

Kontakt
Skype nemanja.lazarevic.567
XFire kingsamp
Mystic World Community
Server Address 176.104.106.8 :5555