Advertisement
Guest User

Feuerwehr Script

a guest
Jan 13th, 2012
1,753
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.57 KB | None | 0 0
  1. /*
  2. Dieses Script wurde von Dominik ak. XYZGamerXP entwickelt mit meinem Bruder Daniel !
  3. Dieses Script ist nun Veröfentlicht und kann jeder Benutzen,Nur Pastebin kein Download
  4. Ihr könnt es sicherlich weiter Ausführen
  5. */
  6. #include <a_samp>
  7. #include <thefiresystem>
  8.  
  9. #define MAX_FIRES 3
  10. #define MIN_CASH 100
  11. #define MAX_CASH 300
  12. forward CreateFire(id);
  13. new FlamesLeft=0;
  14. new Icon=0;
  15. new Float:mx, Float:my, Float:mz;
  16. public OnFilterScriptInit()
  17. {
  18. f_init();
  19. //SetTimerEx("CreateFire", random(60000) + 80000, false, "i", random(MAX_FIRES));
  20. CreateFire(random(3));
  21. return 1;
  22. }
  23.  
  24. public CreateFire(id)
  25. {
  26.  
  27. switch(id)
  28. {
  29. case 0:
  30. {
  31. FlamesLeft = 7;
  32. SendClientMessageToAll(0xFFFFFFFF, "[TrackFireInfo] Ein {FF0000}Feuer{FFFFFF} brach in der {00FF00}LS Mall{FFFFFF} aus!");
  33. AddFire(1109.7426,-1518.5206,15.7969, random(100), 0);
  34. AddFire(1109.4607,-1517.0424,15.7969, random(100), 0);
  35. AddFire(1110.8823,-1518.2303,15.7969, random(100), 0);
  36. AddFire(1111.1472,-1519.8075,15.7969, random(100), 0);
  37. AddFire(1108.0875,-1516.2218,15.7969, random(100), 0);
  38. AddFire(1107.0024,-1516.8269,15.7969, random(100), 0);
  39. AddFire(1108.9535,-1514.8013,15.7969, random(100), 0);
  40. mx = 1109.7426;my=-1518.5206;mz=15.7969;
  41.  
  42. }
  43. case 1:
  44. {
  45. FlamesLeft = 7;
  46. SendClientMessageToAll(0xFFFFFFFF, "[TrackFireInfo] Ein {FF0000}Feuer{FFFFFF} brach am {00FF00}LS Hospital{FFFFFF} aus!");
  47. AddFire(2017.7671,-1437.9889,14.3000, random(100), 0);
  48. AddFire(2019.3118,-1436.9531,14.3859, random(100), 0);
  49. AddFire(2019.1769,-1438.8497,14.7842, random(100), 0);
  50. AddFire(2018.9347,-1440.3239,15.0654, random(100), 0);
  51. AddFire(2020.1074,-1440.3599,15.3154, random(100), 0);
  52. AddFire(2021.1141,-1439.6196,15.3568, random(100), 0);
  53. AddFire(2023.2761,-1441.0536,16.1249, random(100), 0);
  54. mx=2017.7671;my=-1437.9889;mz=14.3000;
  55. }
  56. case 2:
  57. {
  58. FlamesLeft = 7;
  59. SendClientMessageToAll(0xFFFFFFFF, "[TrackFireInfo] Ein {FF0000}Feuer{FFFFFF} brach am {00FF00}LSPD{FFFFFF} aus!");
  60. AddFire(1486.9941,-1667.0309,14.5532, random(100), 0);
  61. AddFire(1486.4098,-1664.8375,14.5532, random(100), 0);
  62. AddFire(1487.9250,-1664.5344,14.5532, random(100), 0);
  63. AddFire(1484.6763,-1666.7335,14.5532, random(100), 0);
  64. AddFire(1482.4634,-1667.3370,14.5532, random(100), 0);
  65. AddFire(1482.3033,-1665.4377,14.5532, random(100), 0);
  66. AddFire(1483.2228,-1663.8508,14.5532, random(100), 0);
  67. mx=1486.9941;my=-1667.0309;mz=14.5532;
  68. }
  69. }
  70. Icon=1;
  71. SetMapIconsForAll();
  72. return 1;
  73. }
  74.  
  75. stock SetMapIconsForAll()
  76. {
  77. for(new i;i<MAX_PLAYERS;i++)
  78. {
  79. SetPlayerMapIcon(i, 0, mx, my, mz, 20, 0, MAPICON_GLOBAL);
  80. }
  81. }
  82.  
  83. stock ResetMapIconsForAll()
  84. {
  85. for(new i;i<MAX_PLAYERS;i++)
  86. {
  87. RemovePlayerMapIcon(i, 0);
  88. }
  89. }
  90.  
  91. public OnPlayerSpawn(playerid)
  92. {
  93. if(Icon)
  94. {
  95. SetPlayerMapIcon(playerid, 0, mx, my, mz, 20, 0, MAPICON_GLOBAL);
  96. }
  97. return 1;
  98. }
  99.  
  100.  
  101.  
  102. public OnFireDeath(ID, killerid)
  103. {
  104. FlamesLeft--;
  105. GivePlayerMoney(killerid, random(MIN_CASH + (MAX_CASH - MIN_CASH)));
  106. if(!FlamesLeft)
  107. {
  108. SendClientMessageToAll(0xFFFFFFFF, "[TrackFireInfo] Das {FF0000}Feuer{FFFFFF} wurde {00FF00}gelöscht{FFFFFF}!");
  109. SetTimerEx("CreateFire", random(60000) + 80000, false, "i", random(MAX_FIRES));
  110. }
  111. ResetMapIconsForAll();
  112. Icon=0;
  113. return 1;
  114. }
  115.  
  116. public OnPlayerUpdate(playerid)
  117. {
  118. f_OnPlayerUpdate(playerid);
  119. return 1;
  120. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement