Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerLeaveDynamicArea(playerid, areaid)
- {
- if(!Bit_Get(Spawned, playerid)) return 1;
- if(GetPlayerVirtualWorld(playerid) != 0) return 1;
- if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING) return 1;
- foreach(new i : Areas)
- {
- if (Areas[i][cpID] == areaid)
- {
- if (Areas[i][Attacker] != INVALID_PLAYER_ID)
- {
- if (PlayerInfo[playerid][pTeam] == PlayerInfo[Areas[i][Attacker]][pTeam])
- {
- Areas[i][Player]--;
- if (! Areas[i][Player])
- {
- GangZoneStopFlashForAll(Areas[i][gzID]);
- Areas[i][Attacker] = INVALID_PLAYER_ID;
- stop Areas[i][ZoneTimer];
- SendClientMessageToAll(-1, "leave 1");
- }
- else if (Areas[i][Attacker] == playerid)
- {
- foreach(new j : Player)
- {
- if(PlayerInfo[j][pTeam] == PlayerInfo[playerid][pTeam])
- {
- if (IsPlayerInDynamicArea(j, areaid))
- {
- Areas[i][Attacker] = j;
- SendClientMessageToAll(-1, "leave 2");
- break;
- }
- }
- }
- }
- }
- }
- SetPlayerProgressBarValue(playerid, gPlayerCaptureBar[playerid], 0.0);
- HidePlayerProgressBar(playerid, gPlayerCaptureBar[playerid]);
- break;
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement