Everydoby see when pd need backup why? can you help me to fix ?> here is cmd
#1

HI to all, when some pd member tupe /bk on screen and radar everybody get message PLYER NEED BACKUP BLA BAL and everybody see marker on radar

is it posibile to set that only police, fbi and national guard can see bk request and location?

Here is cmd

Код:
if(strcmp(cmd,"/backup",true)==0 || strcmp(cmd,"/bk",true)==0)
	{
		if(IsPlayerConnected(playerid))
		{
			if(PlayerInfo[playerid][pMember] == 1 ||PlayerInfo[playerid][pLeader] == 1 || (PlayerInfo[playerid][pMember] == 2 ||PlayerInfo[playerid][pLeader] == 2 || (PlayerInfo[playerid][pMember] == 3 ||PlayerInfo[playerid][pLeader] == 3)))
			{
				if (PlayerInfo[playerid][pRequestingBackup] != 1 || (PlayerInfo[playerid][pRequestingBackup] != 2 || (PlayerInfo[playerid][pRequestingBackup] != 3)))
				{
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "ALL UNITS: %s NEED BACK UP AT LOCATION ON RADAR).", sendername);
					PlayerInfo[playerid][pRequestingBackup] = 1;
					for(new i = 0; i < MAX_PLAYERS; i++)
					{
						if(IsPlayerConnected(i))
						{
						if(PlayerInfo[playerid][pMember] == 1 ||PlayerInfo[playerid][pLeader] == 1 || (PlayerInfo[playerid][pMember] == 2 ||PlayerInfo[playerid][pLeader] == 2 || (PlayerInfo[playerid][pMember] == 3 ||PlayerInfo[playerid][pLeader] == 3)))
							{
							if(PlayerInfo[playerid][pMember] == 1 ||PlayerInfo[playerid][pLeader] == 1 || (PlayerInfo[playerid][pMember] == 2 ||PlayerInfo[playerid][pLeader] == 2 || (PlayerInfo[playerid][pMember] == 3 ||PlayerInfo[playerid][pLeader] == 3)))
  								SetPlayerMarkerForPlayer(i, playerid, 0xFF0000FF);
								SendClientMessage(i, TEAM_BLUE_COLOR, string);
							}
						}
					}
					SendClientMessage(playerid, TEAM_BLUE_COLOR, "Use /bkc to cancel bk.");
					SetTimerEx("BackupClear", 180000, false, "ii", playerid, 1);
				}
				else
				{
					SendClientMessage(playerid, COLOR_GREY, "You send your request for back up!");
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "NOt a cop!");
			}
		}
		return 1;
	}
 if(strcmp(cmd,"/backupclear",true)==0 || strcmp(cmd,"/bkc",true)==0)
	{
		BackupClear(playerid, 0);
		return 1;
	}
Reply
#2

I don't Sure.

pawn Код:
if(strcmp(cmd,"/backup",true)==0 || strcmp(cmd,"/bk",true)==0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pMember] == 1 ||PlayerInfo[playerid][pLeader] == 1 || (PlayerInfo[playerid][pMember] == 2 ||PlayerInfo[playerid][pLeader] == 2 || (PlayerInfo[playerid][pMember] == 3 ||PlayerInfo[playerid][pLeader] == 3)))
            {
                if (PlayerInfo[playerid][pRequestingBackup] != 1 || (PlayerInfo[playerid][pRequestingBackup] != 2 || (PlayerInfo[playerid][pRequestingBackup] != 3)))
                {
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    format(string, sizeof(string), "ALL UNITS: %s NEED BACK UP AT LOCATION ON RADAR).", sendername);
                    SendRadioMessage(1, TEAM_AZTECAS_COLOR, string); //Police
                    SendRadioMessage(2, TEAM_AZTECAS_COLOR, string); //FBI
                    SendRadioMessage(, TEAM_AZTECAS_COLOR, string); //National Guard
                    PlayerInfo[playerid][pRequestingBackup] = 1;
                    for(new i = 0; i < MAX_PLAYERS; i++)
                    {
                        if(IsPlayerConnected(i))
                        {
                            if(PlayerInfo[i][pMember] == 1 ||PlayerInfo[i][pLeader] == 1 || PlayerInfo[i][pMember] == 2 ||PlayerInfo[i][pLeader] == 2 || PlayerInfo[i][pMember] == 3 ||PlayerInfo[i][pLeader] == 3)                         {
                                SetPlayerMarkerForPlayer(i, playerid, 0xFF0000FF);
                                SendClientMessage(i, TEAM_BLUE_COLOR, string);
                            }
                        }
                    }
                    SendClientMessage(playerid, TEAM_BLUE_COLOR, "Use /bkc to cancel bk.");
                    SetTimerEx("BackupClear", 180000, false, "ii", playerid, 1);
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY, "You send your request for back up!");
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "NOt a cop!");
            }
        }
        return 1;
    }
    if(strcmp(cmd,"/backupclear",true)==0 || strcmp(cmd,"/bkc",true)==0)
    {
        BackupClear(playerid, 0);
        return 1;
    }
Reply
#3

Change playerid to i

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i))
    {
        if(PlayerInfo[i][pMember] == 1 ||PlayerInfo[i][pLeader] == 1 || (PlayerInfo[i][pMember] == 2 ||PlayerInfo[i][pLeader] == 2 || (PlayerInfo[i][pMember] == 3 ||PlayerInfo[i][pLeader] == 3)))
        {
            SetPlayerMarkerForPlayer(i, playerid, 0xFF0000FF);
            SendClientMessage(i, TEAM_BLUE_COLOR, string);
        }
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)