SA-MP Forums Archive
How do I add new team... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How do I add new team... (/showthread.php?tid=253941)



How do I add new team... - Join7 - 08.05.2011

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;
	}



Re: How do I add new team... - MadeMan - 08.05.2011

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



Re: How do I add new team... - Bates - 08.05.2011

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



Re: How do I add new team... - Join7 - 08.05.2011

Thank you!