SHUTTING DOWN BY THE POLICE
#1

Код:
if(PlayerInfo[PlayerNameCapping][pFaction] == 1 || PlayerInfo[PlayerNameCapping][pLeader] == 1)
				    {
				        format(szMessage, sizeof(szMessage), "* %s | Capper: %s | Shutting down by the POLICE | Time left: Less than 1 minute", Points[i][Name], Points[i][PlayerNameCapping]);
					}
IT doesnt show up if police is attempting to shutdown it

FULL CODE:

Код:
CMD:pointinfo(playerid, params[])
{
	new
		iCount,
		szMessage[128];

	SendClientMessage(playerid, COLOR_NEWS, "Point Info:");
	for(new i; i < MAX_POINTS; i++) {
		if(Points[i][Type] >= 0) {
		    if(Points[i][Vulnerable] == 0 && Points[i][TakeOverTimerStarted] > 0)
			{
				if(Points[i][TakeOverTimer] == 0)
				{
				    if(PlayerInfo[PlayerNameCapping][pFaction] == 1 || PlayerInfo[PlayerNameCapping][pLeader] == 1)
				    {
				        format(szMessage, sizeof(szMessage), "* %s | Capper: %s | Shutting down by the POLICE | Time left: Less than 1 minute", Points[i][Name], Points[i][PlayerNameCapping]);
					}
					else
					{
						format(szMessage, sizeof(szMessage), "* %s | Capper: %s | Family: %s | Time left: Less than 1 minute", Points[i][Name], Points[i][PlayerNameCapping], FamilyInfo[Points[i][ClaimerTeam]][FamilyName]);
					}
					SendClientMessage(playerid, COLOR_WHITE, szMessage);
					iCount++;
				}
				else
				{
				    if(PlayerInfo[PlayerNameCapping][pFaction] == 1 || PlayerInfo[PlayerNameCapping][pLeader] == 1)
				    {
				        format(szMessage, sizeof(szMessage), "* %s | Capper: %s | Shutting down by the POLICE | Time left: %d minutes", Points[i][Name], Points[i][PlayerNameCapping], Points[i][TakeOverTimer]);
				    }
				    else
				    {
						format(szMessage, sizeof(szMessage), "* %s | Capper: %s | Family: %s | Time left: %d minutes", Points[i][Name], Points[i][PlayerNameCapping], FamilyInfo[Points[i][ClaimerTeam]][FamilyName], Points[i][TakeOverTimer]);
					}
					SendClientMessage(playerid, COLOR_WHITE, szMessage);
					iCount++;
				}
			}
		}
	}
	if(iCount == 0)
		return SendClientMessage(playerid, COLOR_GRAD2, "No family has capped the point or the point is not ready to be capped.");
	return 1;
}
Reply
#2

pawn Код:
forward CaptureTimer(point);
public CaptureTimer(point)
{
    new string[128];
    new fam;
    if(Points[point][ClaimerId] != INVALID_PLAYER_ID && Points[point][TimeToClaim])
    {
        new claimer = Points[point][ClaimerId];
        new Float: x, Float: y, Float: z;
        GetPlayerPos(claimer, x, y, z);
        if(Points[point][Capturex] != x || Points[point][Capturey] != y || Points[point][Capturez] != z || GetPVarInt(Points[point][ClaimerId],"Injured") == 1)
        {
            SendClientMessage(Points[point][ClaimerId], COLOR_LIGHTBLUE, "You failed to capture. You either moved or died while attempting to capture.");
            Points[point][ClaimerId] = INVALID_PLAYER_ID;
            Points[point][TimeToClaim] = 0;
        }
        else
        {
            if(Points[point][Vulnerable] > 0)
            {
                SendClientMessage(Points[point][ClaimerId], COLOR_LIGHTBLUE, "You failed to capture. The point was already captured.");
                Points[point][ClaimerId] = INVALID_PLAYER_ID;
                Points[point][TimeToClaim] = 0;
                return 1;
            }
            if(playerTabbed[claimer] != 0)
            {
                SendClientMessage(Points[point][ClaimerId], COLOR_LIGHTBLUE, "You failed to capture. You were alt-tabbed.");
                format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) may have possibly alt tabbed to capture a point.", GetPlayerNameEx(claimer), claimer);
                ABroadCast(COLOR_YELLOW, string, 1);

                format(string, sizeof(string), "%s may have possibly alt tabbed to capture a point.", GetPlayerNameEx(claimer));
                AddAutomatedFlag(claimer, string);

                Points[point][ClaimerId] = INVALID_PLAYER_ID;
                Points[point][TimeToClaim] = 0;
                return 1;
            }
            if(PlayerInfo[claimer][pFaction] == 1 && PlayerInfo[claimer][pLeader] == 1)
            {
                Points[point][PlayerNameCapping] = GetPlayerNameEx(claimer);
                format(string, sizeof(string), "%s is attempting to shutdown the %s for the POLICE, they'll own it in %d minutes.", Points[point][PlayerNameCapping], Points[point][Name], TIME_TO_TAKEOVER);
                SendClientMessageToAllEx(COLOR_YELLOW, string);
                if(Points[point][CaptureProccessEx] >= 1)
                {
                    Points[point][CaptureProccessEx] = 2;
                }
                Points[point][TakeOverTimerStarted] = 1;
                Points[point][TakeOverTimer] = 10;
                Points[point][ClaimerId] = INVALID_PLAYER_ID;
                Points[point][ClaimerTeam] = fam;
                Points[point][TimeToClaim] = 0;
                if(Points[point][CaptureTimerEx2] != -1) KillTimer(Points[point][CaptureTimerEx2]);
                Points[point][CaptureTimerEx2] = SetTimerEx("CaptureTimerEx", 60000, 1, "d", point);
            }
            else
            {
                fam = PlayerInfo[claimer][pGang];
                Points[point][PlayerNameCapping] = GetPlayerNameEx(claimer);
                format(string, sizeof(string), "%s is attempting to take over of the %s for %s, they'll own it in %d minutes.", Points[point][PlayerNameCapping], Points[point][Name], FamilyInfo[fam][FamilyName], TIME_TO_TAKEOVER);
                SendClientMessageToAllEx(COLOR_YELLOW, string);
                if(Points[point][CaptureProccessEx] >= 1)
                {
                    Points[point][CaptureProccessEx] = 2;
                }
                Points[point][TakeOverTimerStarted] = 1;
                Points[point][TakeOverTimer] = 10;
                Points[point][ClaimerId] = INVALID_PLAYER_ID;
                Points[point][ClaimerTeam] = fam;
                Points[point][TimeToClaim] = 0;
                if(Points[point][CaptureTimerEx2] != -1) KillTimer(Points[point][CaptureTimerEx2]);
                Points[point][CaptureTimerEx2] = SetTimerEx("CaptureTimerEx", 60000, 1, "d", point);
            }
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)