Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.50 KB | None | 0 0
  1. if(WarInfo[i][wTime] > 0 && (WarInfo[i][wAttacker] != 0 && WarInfo[i][wFaction] != 0))
  2. {
  3. WarInfo[i][wTime]--;
  4. new attacker = WarInfo[i][wAttacker];
  5. new defender = WarInfo[i][wFaction];
  6. new att = attacker;
  7. new deff = defender;
  8.  
  9. foreach(new x : Player)
  10. {
  11. if(FactionInfo[PlayerInfo[x][pMember]][fInWar] == 0 && InPaintballMode[x] == 0)
  12. {
  13. foreach(new a : Player)
  14. {
  15. SetPlayerMarkerForPlayer( x, a, ( GetPlayerColor( a ) & 0xFFFFFF00 ) );
  16. }
  17. }
  18. if((PlayerInfo[x][pMember] == WarInfo[i][wFaction] || PlayerInfo[x][pMember] == WarInfo[i][wAttacker]) && PlayerInfo[x][pMember] != 0)
  19. {
  20. if(InHQ[x] == 0 && InBizz[x] == 0 && InHouse[x] == 0 && PlayerInfo[x][pDMV] == 0 && InGarage[x] == 0 && InTW[x] == 0)
  21. {
  22. SetPlayerVirtualWorld(x, 40000);
  23. WarVirtual[x] = 1;
  24. }
  25. new time = WarInfo[i][wTime];
  26. if(JustJoined[x] == 1)
  27. {
  28. PlayerTextDrawShow(x, WarTimme[x]);
  29. }
  30.  
  31. new sc = PlayerInfo[x][pWarScore] - PlayerInfo[x][pWarDeaths];
  32. format(string,256, "Time_left:_%s~n~your_score:_%i~n~turf:_%i", CalculateTime(time), sc,i);
  33. PlayerTextDrawSetString(x, WarTimme[x], string);
  34.  
  35. GangZoneFlashForPlayer(x, Turfs[i], GetTeamZoneColor(WarInfo[i][wAttacker]));
  36.  
  37.  
  38. if(WarInfo[i][wTime] == 0 || WarInfo[i][wTime] == 1)
  39. {
  40. GangZoneStopFlashForPlayer(x, Turfs[i]);
  41. PlayerTextDrawHide(x, WarTimme[x]);
  42. }
  43. if(IsPlayerInTurf(x, i))
  44. {
  45. SecondsOnTurf[x]++;
  46. if(OnTurf[x] == 0)
  47. {
  48. new qr[256];
  49. mysql_format(handle, qr, 256, "SELECT * FROM `warparts` WHERE `PlayerID` = '%i' AND `WarID` = '%i'", PlayerInfo[x][pDatabaseID], WarInfo[i][wID]);
  50. new Cache: baiat = mysql_query(handle, qr);
  51. if(cache_get_row_count() == 0)
  52. {
  53. 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]);
  54. mysql_tquery(handle, qr);
  55. }
  56. OnTurf[x] = 1;
  57. cache_delete(baiat);
  58. }
  59. if(JustRemoved[x] == 0)
  60. {
  61. if(IsPlayerInAnyVehicle(x))
  62. {
  63. RemovePlayerFromVehicleEx(x);
  64. if(PlayerInfo[x][pLanguage] == 0)
  65. {
  66. SCM(x, COLOR_SYN, "Nu ai voie cu masina pe turf in timpul war-ului!");
  67. }
  68. else
  69. {
  70. SCM(x, COLOR_SYN, "You are not allowed to drive vehicles on the turf!");
  71. }
  72. JustRemoved[x] = 1;
  73. }
  74. }
  75. }
  76.  
  77. foreach(new a : Player)
  78. {
  79. 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]))
  80. {
  81. SetPlayerMarkerForPlayer(x, a, GetPlayerColor(a));
  82. }
  83. }
  84. if(FactionInfo[PlayerInfo[x][pMember]][fInWar] == 0)
  85. {
  86. foreach(new a : Player)
  87. {
  88. SetPlayerMarkerForPlayer( x, a, ( GetPlayerColor( a ) & 0xFFFFFF00 ) );
  89. }
  90. }
  91. if(GetPlayerState(x) == PLAYER_STATE_ONFOOT)
  92. {
  93. JustRemoved[x] = 0;
  94. }
  95. }
  96. else if(PlayerInfo[x][pMember] == 0)
  97. {
  98. TextDrawHideForPlayer(x, WarBox);
  99. PlayerTextDrawHide(x, WarTimme[x]);
  100. GangZoneStopFlashForPlayer(x, Turfs[i]);
  101. }
  102. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement