Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. //////////////////////////////////////////////////////////////////////////////////////////////////////////
  2. // Freeplay Alarm Vollalarm - Script v1.7 //
  3. // ************************************************ //
  4. // //
  5. // 1.0| PCmdFPAlarmVollalarm //
  6. // //
  7. // _____________________ //
  8. // //
  9. //////////////////////////////////////////////////////////////////////////////////////////////////////////
  10.  
  11.  
  12. const char IMG_ICON[] = "uitruk_grip1";
  13. const char IMG_CURSOR[] = "send";
  14.  
  15. const char COMMANDABLE_TRUE[] = "DUMMYSetCommandableTrue";
  16. const char COMMANDABLE_FALSE[] = "DUMMYSetCommandableFalse";
  17.  
  18. const char FREEFORALERT_TRUE[] = "DUMMYFPSetFreeForAlertTrue";
  19. const char FREEFORALERT_FALSE[] = "DUMMYFPSetFreeForAlertFalse";
  20. const char FREEFORALERT[] = "DUMMYFPIsFreeForAlert";
  21.  
  22. const char INBASE_TRUE[] = "DUMMYFPSetInBaseTrue";
  23. const char INBASE_FALSE[] = "DUMMYFPSetInBaseFalse";
  24. const char INBASE[] = "DUMMYFPIsInBase";
  25.  
  26. const char AlarmSound[] = "mod:Audio/FX/GMK/GRIP1S.wav";
  27.  
  28. // 1.0
  29. object alarmeer_uitruk_grip1 : CommandScript
  30. {
  31.  
  32. alarmeer_uitruk_grip1()
  33. {
  34. SetIcon(IMG_ICON);
  35. SetCursor(IMG_CURSOR);
  36. SetValidTargets(ACTOR_FLOOR | ACTOR_STREET);
  37. SetDoubleClickable(false);
  38. SetActivationByLeftClick(false);
  39. }
  40.  
  41. bool CheckPossible(GameObject *Caller)
  42. {
  43. return true;
  44. }
  45.  
  46. bool CheckTarget(GameObject *Caller, Actor *Target, int childID)
  47. Mission::PlayHint("regio: 13 AMS Amsterdam-Amstelland eenheden: 0200591 COMMANDO TEAM PLAATS INCIDENT GRIP1. 0100200 Brandweer Veiligheidsregio Amsterdam Amstelland");
  48. {
  49. Person p(Caller);
  50.  
  51. /*IS OPGEROEPEN DOOR CENTRALIST!*/
  52. if (p.HasName("Centralist") || p.HasName("OVD"))
  53. return true;
  54.  
  55. if (Caller->GetID() == Target->GetID())
  56. return false;
  57.  
  58. return false;
  59. }
  60.  
  61. void PushActions(GameObject *Caller, Actor *Target, int childID)
  62. {
  63. GameObject *o1;
  64. GameObjectList ol1;
  65.  
  66. ol1=Game::GetGameObjects("Centralist");
  67. o1 = *ol1.GetObject(1);
  68. Person p1(o1);
  69.  
  70. Vector tpos;
  71.  
  72. tpos = Game::GetCommandPos();
  73.  
  74. Mission::PlayHint("Grip 1");
  75. Game::ExecuteCommand("alarmeer_brandweer_spawn_ags",Caller,Target);
  76. Game::ExecuteCommand("alarmeer_brandweer_spawn_hovd",Caller,Target);
  77. Game::ExecuteCommand("alarmeer_brandweer_spawn_crashtender",Caller,Target);
  78.  
  79. Game::ExecuteCommand("alarmeer_politie_spawn_ovdp",Caller,Target);
  80.  
  81. Game::ExecuteCommand("alarmeer_ambulance_ovdg",Caller,Target);
  82.  
  83. Audio::PlaySample(AlarmSound);
  84.  
  85.  
  86. return;
  87. }
  88. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement