28.01.2015, 15:00
Quote:
stock ActiveCAPZONE(playerid) { if(UnderAttack[CAPZONE] == 0) { if(!IsPlayerInAnyVehicle(playerid)) { UnderAttack[CAPZONE] = 1; timer[playerid][CAPZONE] = SetTimerEx("CAPZONETimer", 25000, false,"i",playerid); Captured[playerid][CAPZONE] = 0; SendClientMessage(playerid, 0xFFFFFFFF,"| Stay in this checkpoint for 25 seconds to capture it! |"); if(gTeam[playerid] == C1) { GangZoneFlashForAll(Zone[CAPZONE], C_GZ_COLOR); } else if(gTeam[playerid] == T1) { GangZoneFlashForAll(Zone[CAPZONE], T_GZ_COLOR); } //------Message----- if(tCP[CAPZONE] == C1) { SendClientMessage(playerid, C_COLOR,"This flag is controlled by Cops!"); SendClientMessageToAll(STEALTH_BLUE,"*Desert Airport is under attack!"); } else if(tCP[CAPZONE] == T1) { SendClientMessage(playerid, T_COLOR,"This flag is controlled by Terrorists!"); SendClientMessageToAll(STEALTH_BLUE,"*Desert Airport is under attack!"); } else if(tCP[CAPZONE] == NONE) { SendClientMessage(playerid, COLOR_WHITE,"This flag is not controlled by any team!"); } //---------loop-------// for(new i = 0; i < MAX_PLAYERS; i ++) { IsPlayerCapturing[i][CAPZONE] = 1; } } else return CaptureZoneMessage(playerid, 1); } else { CaptureZoneMessage(playerid, 2); TextDrawHideForPlayer(playerid, CountText[playerid]); } return 1; } stock CAPZONECaptured(playerid) { Captured[playerid][CAPZONE] = 1; UnderAttack[CAPZONE] = 0; KillTimer(timer[playerid][CAPZONE]); CountVar[playerid][CAPZONE] = 25; GivePlayerScore(playerid, 5); TextDrawHideForPlayer(playerid, CountText[playerid]); GivePlayerMoney(playerid, 5000); SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured the Desert Airport! You received +5 scores and +$5000 cash!"); //================================================== ======================== |