Advertisement
Guest User

Untitled

a guest
Oct 20th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. object alarm_feuk : CommandScript
  2. {
  3. alarm_feuk()
  4. {
  5. SetValidTargets(ACTOR_FLOOR);
  6. SetIcon("alarm_feuk");
  7. SetCursor("alarm_feuk");
  8. }
  9.  
  10. bool CheckTarget(GameObject *Caller, Actor *Target, int childID)
  11. {
  12. if( Caller->GetID() == Target->GetID() || Target->GetType() == ACTOR_VEHICLE || Target->GetType() == ACTOR_HOUSE || Target->GetType() == ACTOR_OPEN_HOUSE || Target->GetType() == ACTOR_PERSON || Target->GetType() == ACTOR_OBJECT)
  13. return false;
  14. return true;
  15. }
  16.  
  17.  
  18. void PushActions(GameObject *Caller, Actor *Target, int childID)
  19. {
  20. Mission::PlayHint("FEUK: Alarmierung läuft...");
  21.  
  22. Einsatzort=Game::GetCommandPos();
  23. if (Target->GetType() == ACTOR_FLOOR)
  24. {
  25. Vehicle p = Game::CreateVehicle("mod:Prototypes/Vehicles/geraete/pylone.e4p", "EinsatzortDummy");
  26. p.Hide();
  27. Game::FindFreePosition(&p,Einsatzort);
  28. p.SetPosition(Einsatzort);
  29. p.PushActionWait(ACTION_NEWLIST, 3);
  30. if (Game::IsMultiplayer())
  31. p.SetPlayerMP(Caller->GetPlayerMP());
  32. } else Vehicle p(Caller);
  33.  
  34. Vector TargetPosition=Game::GetCommandPos();
  35. if(Game::IsInTrigger("einsatzgebiet_nord_west", TargetPosition))
  36. {
  37. p.PushActionExecuteCommand(ACTION_APPEND, "rufe_fahrzeug", Caller, 27, false);
  38. p.PushActionExecuteCommand(ACTION_APPEND, "rufe_fahrzeug", Caller, 44, false);
  39. } else
  40. if(Game::IsInTrigger("einsatzgebiet_nord_ost", TargetPosition))
  41. {
  42. p.PushActionExecuteCommand(ACTION_APPEND, "rufe_fahrzeug", Caller, 2, false);
  43. p.PushActionExecuteCommand(ACTION_APPEND, "rufe_fahrzeug", Caller, 44, false);
  44. } else
  45. if(Game::IsInTrigger("einsatzgebiet_mitte", TargetPosition))
  46. {
  47. p.PushActionExecuteCommand(ACTION_APPEND, "rufe_fahrzeug", Caller, 27, false);
  48. p.PushActionExecuteCommand(ACTION_APPEND, "rufe_fahrzeug", Caller, 44, false);
  49. } else
  50. if(Game::IsInTrigger("einsatzgebiet_sued", TargetPosition))
  51. {
  52. p.PushActionExecuteCommand(ACTION_APPEND, "rufe_fahrzeug", Caller, 60, false);
  53. p.PushActionExecuteCommand(ACTION_APPEND, "rufe_fahrzeug", Caller, 44, false);
  54. } else
  55. {
  56. p.PushActionExecuteCommand(ACTION_APPEND, "rufe_hlf", Caller, 0, false);
  57. p.PushActionExecuteCommand(ACTION_APPEND, "rufe_pol", Caller, 0, false);
  58. }
  59. }
  60.  
  61. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement