Jump to content
  • 0

ajutor va rog..


Question

Posted

am si eu 2 probleme... si nu stiu ce au ....

1.Roadblock: daca dau /rb imi apar ... dar daca dau /rrb sau /rrball nu merg

//----------------------------------------{RB]------------------------
	if(strcmp(cmd, "/rb", true) == 0)
	{
	    if(IsPlayerConnected(playerid) && IsACop(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
     	{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /rb [Roadblock ID]");
				SendClientMessage(playerid, COLOR_LIGHTBLUE, "Available Roadblocks:");
				SendClientMessage(playerid, COLOR_GRAD1, "| 1: Small Roadblock");
				SendClientMessage(playerid, COLOR_GRAD1, "| 2: Medium Roadblock");
				SendClientMessage(playerid, COLOR_GRAD1, "| 3: Big Roadblock");
				SendClientMessage(playerid, COLOR_GRAD1, "| 4: Cone");
				return 1;
			}
            new rb = strval(tmp);
            if (rb == 1)
			{
			    if(roadb == MAX_ROADBLOCKS)
			    {
			        SendClientMessage(playerid, COLOR_GRAD1, " Nu mai poti adauga bariere, maximul e 35 !");
			    }
			    else
			    {
					roadb++;
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
			        GetPlayerPos(playerid, plocx, plocy, plocz);
			        GetPlayerFacingAngle(playerid,ploca);
			        CreateRoadblock(1459,plocx,plocy,plocz,ploca);
			        GetPlayerName(playerid, sendername, sizeof(sendername));
			        format(string,sizeof(string),"[HQ]: Officer %s has placed a Roadblock(1) at his position, over.",sendername);
			        SendRadioMessage(1,COLOR_BLUE,string);
			        GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",3000,1);
					return 1;
				}
			}
			else if (rb == 2)
			{
				if(roadb == MAX_ROADBLOCKS)
			    {
			        SendClientMessage(playerid, COLOR_GRAD1, " Nu mai poti adauga bariere, maximul e 35 !");
			    }
			    else
			    {
					roadb++;
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
			        GetPlayerPos(playerid, plocx, plocy, plocz);
			        GetPlayerFacingAngle(playerid,ploca);
			        CreateRoadblock(978,plocx,plocy,plocz+0.6,ploca);
			        GetPlayerName(playerid, sendername, sizeof(sendername));
			        format(string,sizeof(string),"[HQ]: Officer %s has placed a Roadblock(2) at his position, over.",sendername);
			        SendRadioMessage(1,COLOR_BLUE,string);
			        GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",3000,1);
					return 1;
				}
			}
			else if (rb == 3)
			{
			    if(roadb == MAX_ROADBLOCKS)
			    {
			        SendClientMessage(playerid, COLOR_GRAD1, " Nu mai poti adauga bariere, maximul e 35 !");
			    }
			    else
			    {
					roadb++;
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
			        GetPlayerPos(playerid, plocx, plocy, plocz);
			        GetPlayerFacingAngle(playerid,ploca);
			        CreateRoadblock(981,plocx,plocy,plocz+0.9,ploca+180);
			        GetPlayerName(playerid, sendername, sizeof(sendername));
			        format(string,sizeof(string),"[HQ]: Officer %s has placed a Roadblock(3) at his position, over.",sendername);
			        SendRadioMessage(1,COLOR_BLUE,string);
			        GameTextForPlayer(playerid,"~w~Roadblock ~g~Placed!",3000,1);
			        SetPlayerPos(playerid, plocx, plocy+1.3, plocz);
					return 1;
				}
			}
			else if (rb == 4)
			{
				if(roadb == MAX_ROADBLOCKS)
			    {
			        SendClientMessage(playerid, COLOR_GRAD1, " Nu mai poti adauga bariere, maximul e 35 !");
			    }
			    else
			    {
					roadb++;
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
			        GetPlayerPos(playerid, plocx, plocy, plocz);
			        GetPlayerFacingAngle(playerid,ploca);
			        CreateRoadblock(1238,plocx,plocy,plocz+0.2,ploca);
			        GetPlayerName(playerid, sendername, sizeof(sendername));
			        format(string,sizeof(string),"[HQ]: Officer %s has placed a Traffic Cone(1) at his position, over.",sendername);
			        SendRadioMessage(1,COLOR_BLUE,string);
			        GameTextForPlayer(playerid,"~w~Cone ~g~Placed!",3000,1);
					return 1;
				}
			}
			/*else if (rb == 4)
			{
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
		        GetPlayerPos(playerid, plocx, plocy, plocz);
		        GetPlayerFacingAngle(playerid,ploca);
		        CreateRoadblock(1425,plocx,plocy,plocz+0.6,ploca);
		        GetPlayerName(playerid, sendername, sizeof(sendername));
		        format(string,sizeof(string),"[HQ]: Officer %s has placed a Detour Sign(4) at his position, over.",sendername);
		        SendRadioMessage(1,COLOR_RED,string);
		        GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);
				return 1;
			}
			else if (rb == 5)
			{
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
		        GetPlayerPos(playerid, plocx, plocy, plocz);
		        GetPlayerFacingAngle(playerid,ploca);
		        CreateRoadblock(3265,plocx,plocy,plocz-0.5,ploca);
		        GetPlayerName(playerid, sendername, sizeof(sendername));
		        format(string,sizeof(string),"[HQ]: Officer %s has placed a Will Be Sign(5) at his position, over.",sendername);
		        SendRadioMessage(1,COLOR_RED,string);
		        GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);
				return 1;
			}
			else if (rb == 6)
			{
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
		        GetPlayerPos(playerid, plocx, plocy, plocz);
		        GetPlayerFacingAngle(playerid,ploca);
		        CreateRoadblock(3091,plocx,plocy,plocz+0.5,ploca+180);
		        GetPlayerName(playerid, sendername, sizeof(sendername));
		        format(string,sizeof(string),"[HQ]: Officer %s has placed a Line Closed Sign(6) at his position, over.",sendername);
		        SendRadioMessage(1,COLOR_RED,string);
		        GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);
				return 1;
			}*/
		}
	    return 1;
	}
	else if (strcmp(cmd,"/rrb",true) == 0)
	{
	    if(IsPlayerConnected(playerid) && IsACop(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
     	{
   			roadb--;
        	DeleteClosestRoadblock(playerid);
        	GetPlayerName(playerid, sendername, sizeof(sendername));
        	format(string,sizeof(string),"[HQ]: Officer %s has removed a Roadblock, over.",sendername);
	        SendRadioMessage(1,COLOR_BLUE,string);
	        GameTextForPlayer(playerid,"~w~Roadblock ~r~Removed!",3000,1);
		}
	    return 1;
	}
	else if (strcmp(cmd,"/rrball",true) == 0)
	{
	    if(IsPlayerConnected(playerid) && IsACop(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
     	{
			if(PlayerInfo[playerid][pRank] >= 6 || IsPlayerAdmin(playerid)) // This being the default Chief rank in LA-RP change if neccesary.
			{
			    roadb = 0;
        		DeleteAllRoadblocks(playerid);
        		GetPlayerName(playerid, sendername, sizeof(sendername));
        		format(string,sizeof(string),"[HQ]: Officer %s has removed all Roadblocks in the area, over.",sendername);
	        	SendRadioMessage(1,COLOR_BLUE,string);
	        	GameTextForPlayer(playerid,"~b~All ~w~Roadblocks ~r~Removed!",3000,1);
			}
		}
	    return 1;
	}
2. Family chat... nu merge deloc .. cand dau /fa imi apare /fa [familychat]... dar cand scriu textul nu apare nimic..
//----------------------------------[LeaderChat]-----------------------------------------------
	if(strcmp(cmd, "/fa", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			if(PlayerInfo[playerid][pMuted] == 1)
			{
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
				return 0;
			}
			if(PlayerInfo[playerid][pMuted] == 1)
			{
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced for family alliance channel");
				return 1;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GREY, "USAGE: /fa [alliance chat]");
				return 1;
                        }
			if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
			{
			    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** [Alliance-The Mafia] Godfather {8EDE9E}%s: {F81414}%s{FFFFFF}. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** [Alliance-The Mafia] Cap %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** [Alliance-The Mafia] Consilier %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** [Alliance-The Mafia] Criminal %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** [Alliance-The Mafia] Baietas %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** [Alliance-The Mafia] Smecher %s: %s. **", sendername, result); }
				else
				{
					format(string, sizeof(string), "** [Alliance-The Mafia] Smecher %s: %s. **", sendername, result);
				}
				//SendRadioMessage(5, 0x33CCFFAA, string);vechi
				SendRadioMessage(5, 0x33CCFFAA, string);
				SendRadioMessage(17, 0x33CCFFAA, string);
				SendRadioMessage(16, 0x33CCFFAA, string);
				//printf("%s", string);//aici
				return 1;
			}
			else if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
			{
			    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** [Alliance-The Triads] Godfather {8EDE9E}%s: {F81414}%s{FFFFFF}. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** [Alliance-The Triads] Underboss %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** [Alliance-The Triads] Capo %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** [Alliance-The Triads] Soldier %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** [Alliance-The Triads] Associate %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** [Alliance-The Triads] Outsider %s: %s. **", sendername, result); }
				else
				{
					format(string, sizeof(string), "** [Alliance-The Triads] Outsider %s: %s. **", sendername, result);
				}
				SendRadioMessage(6, 0x33CCFFAA, string);
				SendRadioMessage(18, 0x33CCFFAA, string);
				SendRadioMessage(15, 0x33CCFFAA, string);
				//printf("%s", string);//aici
				return 1;
			}
			else if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
			{
				if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** [Alliance-Boys] Vagos Lord {8EDE9E}%s: {F81414}%s{FFFFFF}. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** [Alliance-Vagos] Second Vagos %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** [Alliance-Vagos] Killer %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** [Alliance-Vagos] Kidnaper %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** [Alliance-Vagos] Bloodster %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** [Alliance-Vagos] Newcomer %s: %s. **", sendername, result); }
				else
				{
					format(string, sizeof(string), "** [Alliance-Grove] Newcomer %s: %s. **", sendername, result);
				}
				SendRadioMessage(15, 0x33CCFFAA, string);
				SendRadioMessage(6, 0x33CCFFAA, string);
				SendRadioMessage(18, 0x33CCFFAA, string);
				//printf("%s", string);//aici
				return 1;
			}
			else if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
			{
				if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** [Alliance-Rifa] Vagos Lord {8EDE9E}%s: {F81414}%s{FFFFFF}. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** [Alliance-Vagos] Second Vagos %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** [Alliance-Vagos] Killer %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** [Alliance-Vagos] Kidnaper %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** [Alliance-Vagos] Bloodster %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** [Alliance-Vagos] Newcomer %s: %s. **", sendername, result); }
				else
				{
					format(string, sizeof(string), "** [Alliance-Rifa] Newcomer %s: %s. **", sendername, result);
				}
				SendRadioMessage(15, 0x33CCFFAA, string);
				SendRadioMessage(6, 0x33CCFFAA, string);
				SendRadioMessage(18, 0x33CCFFAA, string);
				//printf("%s", string);//aici
				return 1;
			}
            else if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
			{
				if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** [Alliance-Grove] Vagos Lord {8EDE9E}%s: {F81414}%s{FFFFFF}. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** [Alliance-Vagos] Second Vagos %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** [Alliance-Vagos] Killer %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** [Alliance-Vagos] Kidnaper %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** [Alliance-Vagos] Bloodster %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** [Alliance-Vagos] Newcomer %s: %s. **", sendername, result); }
				else
				{
					format(string, sizeof(string), "** [Alliance-Grove] Newcomer %s: %s. **", sendername, result);
				}
				SendRadioMessage(15, 0x33CCFFAA, string);
				SendRadioMessage(6, 0x33CCFFAA, string);
				SendRadioMessage(18, 0x33CCFFAA, string);
				//printf("%s", string);//aici
				return 1;
			}
            else if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
			{
                if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** [Alliance-Ballas] Lord Aztecas {8EDE9E}%s: {F81414}%s{FFFFFF}. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** [Alliance-Aztecas] Aztecas Warrior %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** [Alliance-Aztecas] Top Aztecas %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** [Alliance-Aztecas] Aztecas Nigga %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** [Alliance-Aztecas] Aztecas Member %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** [Alliance-Aztecas] Newcomer %s: %s. **", sendername, result); }
				else
				{
					format(string, sizeof(string), "** [Alliance-Ballas] Newcomer %s: %s. **", sendername, result);
				}
				SendRadioMessage(16, 0x33CCFFAA, string);
				SendRadioMessage(17, 0x33CCFFAA, string);
				SendRadioMessage(5, 0x33CCFFAA, string);
				//printf("%s", string); //aici
				return 1;
			}
            else if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
			{
		 		if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** [Alliance-Vagos] Balla Lord {8EDE9E}%s: {F81414}%s{FFFFFF}. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** [Alliance-Ballas] Balla Royalty %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** [Alliance-Ballas] Front Balla %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** [Alliance-Ballas] Ground Shoulder %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** [Alliance-Ballas] Balla Walker %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** [Alliance-Ballas] Newcomer %s: %s. **", sendername, result); }
				else
				{
					format(string, sizeof(string), "** [Alliance-Vagos] Newcomer %s: %s. **", sendername, result);
				}
				SendRadioMessage(17, 0x33CCFFAA, string);
				SendRadioMessage(5, 0x33CCFFAA, string);
				SendRadioMessage(16, 0x33CCFFAA, string);
				//printf("%s", string);//aici
				return 1;
			}
			else if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
			{
                if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** [Alliance-Aztecas] Top OG {8EDE9E}%s: {F81414}%s{FFFFFF}. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** [Alliance-Grove] Second OG %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** [Alliance-Grove] Mastermind OG %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** [Alliance-Grove] Souljah %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** [Alliance-Grove] Mercenary %s: %s. **", sendername, result); }
				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** [Alliance-Grove] Newcomer %s: %s. **", sendername, result); }
				else
				{
					format(string, sizeof(string), "** [Alliance-Aztecas] Newcomer %s: %s. **", sendername, result);
				}
				SendRadioMessage(18, 0x33CCFFAA, string);
				SendRadioMessage(6, 0x33CCFFAA, string);
				SendRadioMessage(15, 0x33CCFFAA, string);
				//printf("%s", string);//aici
				return 1;
			}
			if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14|| PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
			{
				SendFAMessage(0x00D56AFF , string);
			}
			if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15|| PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
			{
				SendFA2Message(0x00D56AFF , string);
			}
		}
		return 1;
	}
si l.am incercat si pe asta..
	//----------------------------------[LeaderChat]-----------------------------------------------
	if(strcmp(cmd, "/fa", true) == 0 || strcmp(cmd, "/familyalliance", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
            if(PlayerInfo[playerid][pMuted] == 1)
			{
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "   You can't speak, you have been silenced !");
				return 1;
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
	        new leaders = PlayerInfo[playerid][pLeader];
	        new members = PlayerInfo[playerid][pMember];
			result[idx - offset] = EOS;

			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "* /familyalliance [alliance chat]");
				return 1;
            }
            if(FindIP(result)) /// Anti-Reclama
   			{
				SendClientMessage(playerid, COLOR_RED, "You have kicked for Guardian , because you write an IP Adrees.");
				new advertiser[MAX_PLAYER_NAME];
				GetPlayerName(playerid, advertiser, sizeof(advertiser));
				format(string, sizeof(string), "FuriosBoT: {FFFF00}%s was kicked with reason: Write an IP Adreess (Reclama)",advertiser);
				SendClientMessageToAll(COLOR_RED,string);
				KickLog(string);
				Kick(playerid);
				return 1;
			}
			if(PlayerInfo[playerid][pAdmin] == 0 || PlayerInfo[playerid][pHelper] == 0)
			    {
				    for(new i=0; i<MAX_ENTRY; i++)
					{
				 	    if(!Swear[i][0]) continue;
						Cenzura(result,Swear[i]);
					}
				}
			else if(leaders==5)
			{
		        format(string, sizeof(string), "* The Mafia Leader [%s]: %s.", sendername, result);
			}
			else if(members==5)
			{
		        format(string, sizeof(string), "* The Mafia Member [%s]: %s.", sendername, result);
			}
			else if(leaders==6)
			{
		        format(string, sizeof(string), "* The Triads Leader [%s]: %s.", sendername, result);
			}
			else if(members==6)
			{
		        format(string, sizeof(string), "* The Triads Member [%s]: %s.", sendername, result);
			}
			else if(leaders==10)
			{
		        format(string, sizeof(string), "* The Nang Boys Leader [%s]: %s.", sendername, result);
			}
			else if(members==10)
			{
		        format(string, sizeof(string), "* The Nang Boys Member[%s]: %s.", sendername, result);
			}
			else if(leaders==11)
			{
		        format(string, sizeof(string), "* The San Fierro Rifa Leader [%s]: %s.", sendername, result);
			}
			else if(members==11)
			{
		        format(string, sizeof(string), "* The San Fierro Rifa Member [%s]: %s.", sendername, result);
			}
			else if(leaders==12)
			{
		        format(string, sizeof(string), "* Grove Street Leader [%s]: %s.", sendername, result);
			}
			else if(members==12)
			{
		        format(string, sizeof(string), "* Grove Street Member [%s]: %s.", sendername, result);
			}
			else if(leaders==13)
			{
		        format(string, sizeof(string), "* Ballas Leader [%s]: %s.", sendername, result);
			}
			else if(members==13)
			{
		        format(string, sizeof(string), "* Ballas Member [%s]: %s.", sendername, result);
			}
			else if(leaders==14)
			{
		        format(string, sizeof(string), "* Los Santos Vagos Leader [%s]: %s.", sendername, result);
			}
			else if(members==14)
			{
		        format(string, sizeof(string), "* Los Santos Vagos Member [%s]: %s.", sendername, result);
			}
			else if(leaders==15)
			{
		        format(string, sizeof(string), "* Variors Los Aztecas Leader [%s]: %s.", sendername, result);
			}
			else if(members==15)
			{
		        format(string, sizeof(string), "* Variors Los Aztecas Member [%s]: %s.", sendername, result);
			}
			if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
			{
				SendFAMessage(0x00D56AFF , string);
			}
			if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
			{
				SendFA2Message(0x00D56AFF , string);
			}
		}
		return 1;
	}
si
public SendFAMessage(color, string[])
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
		    if(PlayerInfo[i][pLeader] == 5 || PlayerInfo[i][pMember] == 5 || PlayerInfo[i][pLeader] == 13 || PlayerInfo[i][pMember] == 13 || PlayerInfo[i][pLeader] == 14 || PlayerInfo[i][pMember] == 14 || PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
		    {
				SendClientMessage(i, color, string);
			}
		}
	}
}

public SendFA2Message(color, string[])
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
		    if(PlayerInfo[i][pLeader] == 6 || PlayerInfo[i][pMember] == 6 || PlayerInfo[i][pLeader] == 12 || PlayerInfo[i][pMember] == 12 || PlayerInfo[i][pLeader] == 15 || PlayerInfo[i][pMember] == 15 || PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
		    {
				SendClientMessage(i, color, string);
			}
		}
	}
}

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

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. For more details you can also review our Terms of Use and Privacy Policy.