Wazanator

hostage.nut

Oct 10th, 2015
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. THINK_FREQUENCY <- 0.5;
  2. m_flLastThink <- 0;
  3. m_bIsAlive <- true;
  4.  
  5. function HostageThink()
  6. {
  7. if ( m_flLastThink + THINK_FREQUENCY > Time() )
  8. return;
  9.  
  10. m_flLastThink = Time();
  11.  
  12. if ( m_bIsAlive )
  13. {
  14. local nHealth = self.GetHealth();
  15. //printl( "Hostage health is = " + nHealth );
  16.  
  17. if ( nHealth <= 0 )
  18. {
  19. m_bIsAlive = false;
  20. ScriptPrintMessageChatAll( "VIP HAS BEEN KILLED!!!" );
  21. EntFire( "@hostage_counter","add", "1", 0 );
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment