/lideri

Započeo Fantom.pWn, April 05, 2012, 17:51:12 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta : Moja
Problem : Ovako kada dam lidera /makeleader id idlidera sve ok sacuva u lider.txt,i kad kucam /lideri izadje ovako
AKO JE ONLINE : [ONLINE] Organizacija : [ImeOrg] Lider : Ime_Prezime
AKO JE OFFLINE : [OFFLINE ] Organizacija : [ImeOrg] Lider : ne pise nista to je problem

KOMANDA ISPOD :
if (strcmp(cmd, "/lideri", true) == 0)
{
	new
		sTmpLeaderList[63],
		sLeaderList[300]
	;

	for(new i = 0; i < GetMaxPlayers(); i++) {
		if(PlayerInfo[i][pLeader] == 1)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] Policija [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] Policija [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
		else if(PlayerInfo[i][pLeader] == 2)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] FBI [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] FBI [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
		else if(PlayerInfo[i][pLeader] == 3)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] Vojska [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] Vojska [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
		else if(PlayerInfo[i][pLeader] == 4)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] Hitna [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] Hitna [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
        else if(PlayerInfo[i][pLeader] == 5)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] Yakuza [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] Yakuza [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
		else if(PlayerInfo[i][pLeader] == 6)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] LCN [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] LCN [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
        else if(PlayerInfo[i][pLeader] == 7)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] Gradonacelnik [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] Gradonacelnik [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
		else if(PlayerInfo[i][pLeader] == 8)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] Hitman [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] Hitman [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
		else if(PlayerInfo[i][pLeader] == 9)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] Novinari [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] Novinari [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
		else if(PlayerInfo[i][pLeader] == 10)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] Taxi [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] Taxi [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
        else if(PlayerInfo[i][pLeader] == 11)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] SFPD [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] SFPD [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
		else if(PlayerInfo[i][pLeader] == 12)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] Ruska Mafia [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] Ruska Mafia [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
        else if(PlayerInfo[i][pLeader] == 13)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] Triads [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] Triads [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
        else if(PlayerInfo[i][pLeader] == 14)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] Yamaguchi [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] Yamaguchi [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
		else if(PlayerInfo[i][pLeader] == 15)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] Crips [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] Crips [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
		else if(PlayerInfo[i][pLeader] == 16)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] Bloods [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] Bloods [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
		else if(PlayerInfo[i][pLeader] == 17)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] Parking Servis [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] Parking Servis [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
		else if(PlayerInfo[i][pLeader] == 18)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] United Force [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] United Force [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
		else if(PlayerInfo[i][pLeader] == 19)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] Delije Sever [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] Delije Sever [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
		else if(PlayerInfo[i][pLeader] == 20)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] Grobari Jug [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] Grobari Jug [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
		else if(PlayerInfo[i][pLeader] == 21)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] Groove Street [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] Groove Street [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
		else if(PlayerInfo[i][pLeader] == 22)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] ????? [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] ?????? [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
		else if(PlayerInfo[i][pLeader] == 23)
		{
			GetPlayerName(i, sendername, sizeof(sendername));

			if (IsPlayerConnected(i)) format(sTmpLeaderList, sizeof(sTmpLeaderList), "[ONLINE] ????? [Lider %s]", sendername);
			else format(sTmpLeaderList, sizeof(sTmpLeaderList), "[OFFLINE] ??????? [Lider %s] |Mob:", sendername);

			strcat(sLeaderList, sTmpLeaderList);
		}
	}

	ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "ONLINE LIDERI", sLeaderList, "U redu", "");
	return 1;
}
Poslednja Izmena: April 05, 2012, 17:51:26 POSLE PODNE od JovanCobain