How do I add new team...
#1

How do I add a new team to this command? That is unless TEAM_POLICE add TEAM_SFPD

Код:
if(strcmp(cmd, "/duty", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pMember] == TEAM_POLICE)
			{
				if (PlayerToPoint(3, playerid,1579.5493, -1635.6027, 13.5608))
				{
				    new ranktext[256];
    				switch(PlayerInfo[playerid][pRank])
				    {
     					case 1: format(ranktext, sizeof(ranktext), "%s", TeamInfo[PlayerInfo[playerid][pMember]][fRank1]);
	        			case 2: format(ranktext, sizeof(ranktext), "%s", TeamInfo[PlayerInfo[playerid][pMember]][fRank2]);
				        case 3: format(ranktext, sizeof(ranktext), "%s", TeamInfo[PlayerInfo[playerid][pMember]][fRank3]);
				        case 4: format(ranktext, sizeof(ranktext), "%s", TeamInfo[PlayerInfo[playerid][pMember]][fRank4]);
				        case 5: format(ranktext, sizeof(ranktext), "%s", TeamInfo[PlayerInfo[playerid][pMember]][fRank5]);
		         		case 6: format(ranktext, sizeof(ranktext), "%s", TeamInfo[PlayerInfo[playerid][pMember]][fRank6]);
				    }
					if(OnDuty[playerid]==0)
			        {
				    	format(string, sizeof(string), "* %s %s влезе на смяна.",ranktext, PlayerName(playerid));
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						OnDuty[playerid] = 1;
					}
					else if(OnDuty[playerid]==1)
					{
						format(string, sizeof(string), "* %s %s излезе от смяна.",ranktext, PlayerName(playerid));
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						OnDuty[playerid] = 0;
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD2, "Ти не си на мястото да минеш на смяна!");
					return 1;
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GRAD1, "Ти не си ченге!");
			}
		}
		return 1;
	}
Reply
#2

pawn Код:
if(PlayerInfo[playerid][pMember] == TEAM_POLICE || PlayerInfo[playerid][pMember] == TEAM_SFPD)
Reply
#3

pawn Код:
else if(PlayerInfo[playerid][pMember] == TEAM_SFPD)
{
Reply
#4

Thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)