[Ajuda] comando /d
#2

Код:
CMD:d(playerid, params[])
{
    new texto[128];
    new string[128];

    if(sscanf(params, "s[128]",texto))
        returnSendClientMessage( playerid,-1,"{FFFFFF}/d [texto] ");

    if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1)
	{
	    if(PlayerInfo[playerid][pCargo] == 8) { format(string, sizeof(string), "Chief %s: %s, over.", PlayerName2(playerid), texto); }
		else if(PlayerInfo[playerid][pCargo] == 7) { format(string, sizeof(string), "Deputy Chief %s: %s, over.", PlayerName2(playerid), texto); }
		else if(PlayerInfo[playerid][pCargo] == 6) { format(string, sizeof(string), "Captain %s: %s, over.", PlayerName2(playerid), texto); }
		else if(PlayerInfo[playerid][pCargo] == 5) { format(string, sizeof(string), "Lieutenant %s: %s, over.", PlayerName2(playerid), texto); }
		else if(PlayerInfo[playerid][pCargo] == 4) { format(string, sizeof(string), "Sergeant %s: %s, over.", PlayerName2(playerid), texto); }
		else if(PlayerInfo[playerid][pCargo] == 3) { format(string, sizeof(string), "Corporal %s: %s, over.", PlayerName2(playerid), texto); }
		else if(PlayerInfo[playerid][pCargo] == 2) { format(string, sizeof(string), "Police Officer %s: %s, over.", PlayerName2(playerid), texto); }
		else if(PlayerInfo[playerid][pCargo] == 1) { format(string, sizeof(string), "Cadet %s: %s, over.", PlayerName2(playerid), texto); }
		else
		    format(string, sizeof(string), "[Unknown] %s (radio): %s, over.", PlayerName2(playerid), texto);

        SentMessage[playerid] = 1;
		SendRadioMessage(3, COLOR_ALLDEPT, string);
		SendRadioMessage(2, COLOR_ALLDEPT, string);
		SendRadioMessage(1, COLOR_ALLDEPT, string);
		SendRadioMessage(4, COLOR_ALLDEPT, string);
		SendRadioMessage(12, COLOR_ALLDEPT, string);
		SendRadioMessage(7, COLOR_ALLDEPT, string);
		SentMessage[playerid] = 0;
		return 1;
	}

    else if(PlayerInfo[playerid][pMembro] == 2 || PlayerInfo[playerid][pLider] == 2)
	{
	    if(PlayerInfo[playerid][pCargo] == 8) { format(string, sizeof(string), "Director %s: %s, over.", PlayerName2(playerid), texto); }
	    else if(PlayerInfo[playerid][pCargo] == 7) { format(string, sizeof(string), "Deputy Director %s: %s, over.", PlayerName2(playerid), texto); }
	    else if(PlayerInfo[playerid][pCargo] == 6) { format(string, sizeof(string), "Assi. Director %s: %s, over.", PlayerName2(playerid), texto); }
		else if(PlayerInfo[playerid][pCargo] == 5) { format(string, sizeof(string), "Division Chief %s: %s, over.", PlayerName2(playerid), texto); }
		else if(PlayerInfo[playerid][pCargo] == 4) { format(string, sizeof(string), "Special Agent in Charge %s: %s, over.", PlayerName2(playerid), texto); }
		else if(PlayerInfo[playerid][pCargo] == 3) { format(string, sizeof(string), "Special Agent %s: %s, over.", PlayerName2(playerid), texto); }
		else if(PlayerInfo[playerid][pCargo] == 2) { format(string, sizeof(string), "Agent %s: %s, over.", PlayerName2(playerid), texto); }
		else if(PlayerInfo[playerid][pCargo] == 1) { format(string, sizeof(string), "Cadet %s: %s, over.", PlayerName2(playerid), texto); }
		else
			format(string, sizeof(string), "[Unknown] %s (radio): %s, over.", PlayerName2(playerid), texto);

        SentMessage[playerid] = 1;
		SendRadioMessage(3, COLOR_ALLDEPT, string);
		SendRadioMessage(2, COLOR_ALLDEPT, string);
		SendRadioMessage(1, COLOR_ALLDEPT, string);
		SendRadioMessage(4, COLOR_ALLDEPT, string);
		SendRadioMessage(12, COLOR_ALLDEPT, string);
		SendRadioMessage(7, COLOR_ALLDEPT, string);
		SentMessage[playerid] = 0;
		return 1;
	}
	else
	    return SendClientMessage(playerid, -1, "   You are not part of a Team !");

	return 1;
}
Reply


Messages In This Thread
comando /d - by loukofire - 17.04.2015, 20:25
Re: comando /d - by GabrielDias_Invision - 17.04.2015, 20:59
Re: comando /d - by loukofire - 17.04.2015, 22:22

Forum Jump:


Users browsing this thread: 2 Guest(s)