Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(WarInfo[i][wTime] > 0 && (WarInfo[i][wAttacker] != 0 && WarInfo[i][wFaction] != 0))
- {
- WarInfo[i][wTime]--;
- new attacker = WarInfo[i][wAttacker];
- new defender = WarInfo[i][wFaction];
- new att = attacker;
- new deff = defender;
- foreach(new x : Player)
- {
- if(FactionInfo[PlayerInfo[x][pMember]][fInWar] == 0 && InPaintballMode[x] == 0)
- {
- foreach(new a : Player)
- {
- SetPlayerMarkerForPlayer( x, a, ( GetPlayerColor( a ) & 0xFFFFFF00 ) );
- }
- }
- if((PlayerInfo[x][pMember] == WarInfo[i][wFaction] || PlayerInfo[x][pMember] == WarInfo[i][wAttacker]) && PlayerInfo[x][pMember] != 0)
- {
- if(InHQ[x] == 0 && InBizz[x] == 0 && InHouse[x] == 0 && PlayerInfo[x][pDMV] == 0 && InGarage[x] == 0 && InTW[x] == 0)
- {
- SetPlayerVirtualWorld(x, 40000);
- WarVirtual[x] = 1;
- }
- new time = WarInfo[i][wTime];
- if(JustJoined[x] == 1)
- {
- PlayerTextDrawShow(x, WarTimme[x]);
- }
- new sc = PlayerInfo[x][pWarScore] - PlayerInfo[x][pWarDeaths];
- format(string,256, "Time_left:_%s~n~your_score:_%i~n~turf:_%i", CalculateTime(time), sc,i);
- PlayerTextDrawSetString(x, WarTimme[x], string);
- GangZoneFlashForPlayer(x, Turfs[i], GetTeamZoneColor(WarInfo[i][wAttacker]));
- if(WarInfo[i][wTime] == 0 || WarInfo[i][wTime] == 1)
- {
- GangZoneStopFlashForPlayer(x, Turfs[i]);
- PlayerTextDrawHide(x, WarTimme[x]);
- }
- if(IsPlayerInTurf(x, i))
- {
- SecondsOnTurf[x]++;
- if(OnTurf[x] == 0)
- {
- new qr[256];
- mysql_format(handle, qr, 256, "SELECT * FROM `warparts` WHERE `PlayerID` = '%i' AND `WarID` = '%i'", PlayerInfo[x][pDatabaseID], WarInfo[i][wID]);
- new Cache: baiat = mysql_query(handle, qr);
- if(cache_get_row_count() == 0)
- {
- mysql_format(handle, qr, 256, "INSERT INTO warparts(PlayerID, WarID, Score, Faction, Seconds) VALUES(%i, %i, %i, %i, 1)", PlayerInfo[x][pDatabaseID], WarInfo[i][wID], PlayerInfo[x][pWarScore] - PlayerInfo[x][pWarDeaths], PlayerInfo[x][pMember]);
- mysql_tquery(handle, qr);
- }
- OnTurf[x] = 1;
- cache_delete(baiat);
- }
- if(JustRemoved[x] == 0)
- {
- if(IsPlayerInAnyVehicle(x))
- {
- RemovePlayerFromVehicleEx(x);
- if(PlayerInfo[x][pLanguage] == 0)
- {
- SCM(x, COLOR_SYN, "Nu ai voie cu masina pe turf in timpul war-ului!");
- }
- else
- {
- SCM(x, COLOR_SYN, "You are not allowed to drive vehicles on the turf!");
- }
- JustRemoved[x] = 1;
- }
- }
- }
- foreach(new a : Player)
- {
- if((PlayerInfo[x][pMember] == WarInfo[i][wAttacker] || PlayerInfo[x][pMember] == WarInfo[i][wFaction]) && FactionInfo[PlayerInfo[x][pMember]][fInWar] == 1 && (PlayerInfo[a][pMember] == WarInfo[i][wAttacker] || PlayerInfo[a][pMember] == WarInfo[i][wFaction]))
- {
- SetPlayerMarkerForPlayer(x, a, GetPlayerColor(a));
- }
- }
- if(FactionInfo[PlayerInfo[x][pMember]][fInWar] == 0)
- {
- foreach(new a : Player)
- {
- SetPlayerMarkerForPlayer( x, a, ( GetPlayerColor( a ) & 0xFFFFFF00 ) );
- }
- }
- if(GetPlayerState(x) == PLAYER_STATE_ONFOOT)
- {
- JustRemoved[x] = 0;
- }
- }
- else if(PlayerInfo[x][pMember] == 0)
- {
- TextDrawHideForPlayer(x, WarBox);
- PlayerTextDrawHide(x, WarTimme[x]);
- GangZoneStopFlashForPlayer(x, Turfs[i]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement