toribio

toribio

Nov 14th, 2008
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.84 KB | None | 0 0
  1. //no topo:
  2. new gzplayer[MAX_GZS+1];
  3.  
  4. //public
  5. public ZoneCheckpointChecker()
  6. {
  7. for(new i; i < MAX_PLAYERS; i++)
  8. {
  9. if(!IsPlayerConnected(i))continue;
  10. if(CPS_GetPlayerCheckpoint(i) > 0 && CPS_GetPlayerCheckpoint(i) <= 50 &&
  11. CoresDasGangZones[CPS_GetPlayerCheckpoint(i)-1] != CoresDosSkins[gTeam[i]] && (gzplayer[CPS_GetPlayerCheckpoint(i)-1] == i || !gzatack[GPS_GetPlayerCheckpoint(i)-1]))
  12. {
  13. if(CPzone[i][CPS_GetPlayerCheckpoint(i)] < 30)
  14. {
  15. if(CPzone[i][CPS_GetPlayerCheckpoint(i)] == 5)
  16. {
  17. for(new j; j < MAX_PLAYERS; j++)
  18. {
  19. if(gTeam[j] == CPS_GetPlayerCheckpoint(i)-1)GameTextForPlayer(j," ~N~ ~N~ ~N~ ~N~ ~N~ ~N~ ~N~ ~R~Uma area da sua Gang esta sendo atacada!",5000,5);
  20. }
  21. }
  22. CPzone[i][CPS_GetPlayerCheckpoint(i)]++;
  23. GZatack[CPS_GetPlayerCheckpoint(i)-1] = 1;
  24. new tmp[10];
  25. format(tmp,sizeof tmp,"~R~%2d / 30",CPzone[i][CPS_GetPlayerCheckpoint(i)]);
  26. GameTextForPlayer(i,tmp,1001,4);
  27. GangZoneFlashForAll(CPS_GetPlayerCheckpoint(i)-1,CoresDosSkins[gTeam[i]]);
  28. }
  29. else if(CPzone[i][CPS_GetPlayerCheckpoint(i)] == 30)
  30. {
  31. PlayerPlaySound(i,1057,0.0,0.0,0.0);
  32. GameTextForPlayer(i,"~R~Kill-Kill: ~G~GangZone dominada!",5000,5);
  33. SendClientMessage(i,RECOMPENSA,"[Kill-Kill RECOMPENSA]: Voc� ganhou 10 Mil por dominar essa GangZone!");
  34. GivePlayerMoney(i,10000);
  35. GZatack[CPS_GetPlayerCheckpoint(i)-1] = 0;
  36. CPzone[i][CPS_GetPlayerCheckpoint(i)] = 0;
  37. CoresDasGangZones[CPS_GetPlayerCheckpoint(i)-1] = CoresDosSkins[gTeam[i]];
  38. GangZoneStopFlashForAll(CPS_GetPlayerCheckpoint(i)-1);
  39. GangZoneHideForAll(CPS_GetPlayerCheckpoint(i)-1);
  40. GangZoneShowForAll(CPS_GetPlayerCheckpoint(i)-1,CoresDasGangZones[gTeam[i]]);
  41. new string[256];
  42. format(string,sizeof string,"[Kill-Kill GANGZONE]: A Gang %s perdeu o territ�rio para a Gang %s!",NomesDasGangs[CPS_GetPlayerCheckpoint(i)-1],NomesDasGangs[gTeam[i]]);
  43. SendClientMessageToAll(GANGZONE,string);
  44. }
  45. }
  46. }
  47. return 1;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment