Custura

Untitled

May 1st, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. CMD:turfs(playerid, params[])
  2. {
  3. if(TurfsDisp[playerid] == 0)
  4. {
  5. TurfsDisp[playerid] = 1;
  6. for(new i; i < sizeof(TurfInfo); ++i)
  7. {
  8. if(TurfInfo[i][zOwned] == 6)
  9. {
  10. GangZoneShowForPlayer(playerid, Turfs[i], 0x198A1399); //Grove Street
  11. }
  12. if(TurfInfo[i][zOwned] == 7)
  13. {
  14. GangZoneShowForPlayer(playerid, Turfs[i], 0xB125E899); //Ballas
  15. }
  16. }
  17. ArataLinii(playerid);
  18. }
  19. else
  20. {
  21. TurfsDisp[playerid] = 0;
  22. AscundeLinii(playerid);
  23. for(new i; i < sizeof(TurfInfo); ++i)
  24. {
  25. GangZoneHideForPlayer(playerid, Turfs[i]);
  26. }
  27. }
  28. return 1;
  29. }
  30.  
  31. stock GangZoneCreateM( Float:MinX,Float:MinY,Float:MaxX,Float:MaxY)
  32. {
  33. new gangid = GangZoneCreate(MinX,MinY,MaxX,MaxY);
  34. MGangZones[gangid][exista] = true;
  35. MGangZones[gangid][linie][0] = GangZoneCreate( MinX-2.0, MinY, MinX+2.0, MaxY );
  36. MGangZones[gangid][linie][1] = GangZoneCreate( MinX-2.0, MaxY-2.0, MaxX, MaxY+2.0 );
  37. MGangZones[gangid][linie][2] = GangZoneCreate( MaxX-2.0, MinY, MaxX+2.0, MaxY );
  38. MGangZones[gangid][linie][3] = GangZoneCreate( MinX-2.0, MinY-2.0, MaxX, MinY+2.0 );
  39. return gangid;
  40. }
  41.  
  42. stock ArataLinii(playerid)
  43. {
  44. for(new i; i < sizeof(Turfs)*5; ++i)
  45. {
  46. if(MGangZones[i][exista])
  47. {
  48. GangZoneShowForPlayer(playerid,MGangZones[i][linie][0],0xFFFFFF99);
  49. GangZoneShowForPlayer(playerid,MGangZones[i][linie][1],0xFFFFFF99);
  50. GangZoneShowForPlayer(playerid,MGangZones[i][linie][2],0xFFFFFF99);
  51. GangZoneShowForPlayer(playerid,MGangZones[i][linie][3],0xFFFFFF99);
  52. }
  53. }
  54. SendClientMessage(playerid, COLOR_YELLOW, "[TURFS]: ON.");
  55. }
  56.  
  57. stock AscundeLinii(playerid)
  58. {
  59. for(new i; i < sizeof(Turfs)*5; ++i)
  60. {
  61. if(MGangZones[i][exista])
  62. {
  63. GangZoneHideForPlayer(playerid,MGangZones[i][linie][0]);
  64. GangZoneHideForPlayer(playerid,MGangZones[i][linie][1]);
  65. GangZoneHideForPlayer(playerid,MGangZones[i][linie][2]);
  66. GangZoneHideForPlayer(playerid,MGangZones[i][linie][3]);
  67. }
  68. }
  69. SendClientMessage(playerid, COLOR_YELLOW, "[TURFS]: OFF.");
  70. }
Add Comment
Please, Sign In to add comment