Advertisement
Guest User

sal

a guest
Jul 8th, 2015
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. forward RandomFire();
  2. public RandomFire()
  3. {
  4. for (new i = 0; i < sizeof(g_aFireObjects); i ++)
  5. {
  6. g_aFireExtinguished[i] = 0;
  7.  
  8. if (IsValidDynamicObject(g_aFireObjects[i]))
  9. DestroyDynamicObject(g_aFireObjects[i]);
  10. }
  11. switch (random(5))
  12. {
  13. case 0:
  14. {
  15.  
  16. }
  17. case 1:
  18. {
  19.  
  20. }
  21. case 2:
  22. {
  23.  
  24. }
  25. case 3:
  26. {
  27.  
  28. }
  29. case 4:
  30. {
  31.  
  32. }
  33. }
  34. static
  35. Float:fX,
  36. Float:fY,
  37. Float:fZ;
  38.  
  39. GetDynamicObjectPos(g_aFireObjects[0], fX, fY, fZ);
  40.  
  41. foreach (new i : Player)
  42. {
  43. if (GetFactionType(i) == FACTION_MEDIC)
  44. {
  45. Waypoint_Set(i, "Fire Scene", fX, fY, fZ);
  46. }
  47. }
  48. //CreateExplosion(fX, fY, fZ, 12, 5.0);
  49. SendFactionMessageEx(FACTION_MEDIC, COLOR_RADIO, "RADIO: Un incendiu a fost raportat %s (a fost marcat pe harta).", GetLocation(fX, fY, fZ));
  50. return 1;
  51. }
  52. ///////comanda cu care dau fire//////
  53. CMD:afire(playerid, params[])
  54. {
  55. if (PlayerData[playerid][pAdmin] < 3)
  56. return SendErrorMessage(playerid, "Nu ai permisiunea pentru a folosi aceasta comanda.");
  57.  
  58. static
  59. Float:fX,
  60. Float:fY,
  61. Float:fZ;
  62.  
  63. RandomFire();
  64.  
  65. GetDynamicObjectPos(g_aFireObjects[0], fX, fY, fZ);
  66. SendServerMessage(playerid, "You have created a random fire (%s).", GetLocation(fX, fY, fZ));
  67. return 1;
  68. }
  69.  
  70. CMD:akillfire(playerid, params[])
  71. {
  72. if (PlayerData[playerid][pAdmin] < 3)
  73. return SendErrorMessage(playerid, "Nu ai permisiunea pentru a folosi aceasta comanda.");
  74.  
  75. for (new i = 0; i < sizeof(g_aFireObjects); i ++)
  76. {
  77. g_aFireExtinguished[i] = 0;
  78.  
  79. if (IsValidDynamicObject(g_aFireObjects[i]))
  80. DestroyDynamicObject(g_aFireObjects[i]);
  81. }
  82. SendServerMessage(playerid, "You have killed the fire.");
  83. return 1;
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement