./cte_news.lua

  1. Cte_news_doc_handle = -1 
  2.  
  3. local News_14_grp_h = -1 
  4. local News_23_grp_h = -1 
  5. local News_23_pre_grp_h = -1 
  6. local Span_09_grp_h = -1 
  7. local Span_ms_grp_h = -1 
  8. local Psa_grp_h = -1 
  9. 	 
  10. local Span_ms_anim_h = -1 
  11.  
  12.  
  13. function cte_news_init() 
  14. 	 
  15. 	Cte_news_doc_handle = vint_document_find("cte_news") 
  16. 	 
  17. 	News_14_grp_h = vint_object_find("news_14_grp", 0, Cte_news_doc_handle) 
  18. 	News_23_grp_h = vint_object_find("news_23_grp", 0, Cte_news_doc_handle) 
  19. 	News_23_pre_grp_h = vint_object_find("news_23_pre_grp", 0, Cte_news_doc_handle) 
  20. 	Span_09_grp_h = vint_object_find("span_09_grp", 0, Cte_news_doc_handle) 
  21. 	Span_ms_grp_h = vint_object_find("span_ms_grp", 0, Cte_news_doc_handle) 
  22. 	Psa_grp_h = vint_object_find("psa_grp", 0, Cte_news_doc_handle) 
  23. 	 
  24. 	Span_ms_anim_h = vint_object_find("span_ms_anim") 
  25.  
  26. 	 
  27. 	vint_set_property(News_14_grp_h, "visible", false) 
  28. 	vint_set_property(News_23_grp_h, "visible", false) 
  29. 	vint_set_property(News_23_pre_grp_h, "visible", false) 
  30. 	vint_set_property(Span_09_grp_h, "visible", false) 
  31. 	vint_set_property(Span_ms_grp_h, "visible", false) 
  32. 	vint_set_property(Psa_grp_h, "visible", false) 
  33. 	 
  34. 	--Dump pause map... 
  35. 	pause_map_dump() 
  36. end 
  37.  
  38. ------------- 
  39. --news 
  40. ------------- 
  41.  
  42. function cte_news_14in_4() 
  43. 	local news_14_anim_h = vint_object_find("news_14_anim") 
  44. 	local news_14_ticker_h = vint_object_find("ticker_txt_14") 
  45. 	vint_set_property(News_14_grp_h, "visible", true) 
  46. 	vint_set_property(news_14_ticker_h, "text_tag", "...Local boy nags parents into purchasing adult elephant as pet...Two children found guilty of using illegal immigrants to supply lemonade stand...Technically Legal fined by health inspectors for 6th outbreak of gonorrhea in as many days...") 
  47. 	lua_play_anim(news_14_anim_h) 
  48. 	if Hud_msg_doc ~= nil or Hud_msg_doc ~= 0 then 
  49. 		hud_msg_subtitle_top() 
  50. 	end 
  51. end 
  52.  
  53. function cte_news_14in_9() 
  54. 	vint_set_property(News_14_grp_h, "visible", false) 
  55. 	if Hud_msg_doc ~= nil or Hud_msg_doc ~= 0 then 
  56. 		hud_msg_subtitle_bottom() 
  57. 	end 
  58. end 
  59.  
  60.  
  61. function cte_news_23out_5() 
  62. 	local news_23_pre_anim_h = vint_object_find("news_23_pre_anim") 
  63. 	local news_23_pre_ticker_h = vint_object_find("ticker_txt_23_pre") 
  64. 	vint_set_property(News_23_pre_grp_h, "visible", true) 
  65. 	vint_set_property(news_23_pre_ticker_h, "text_tag", "...Memorial service for boy trampled to death by elephant to be held tomorrow...Saints Flow recalled after recent positive tests for HGH...Free cheeseburger day at Freckle Bitch's leaves 6 dead; dozens more injured...") 
  66. 	lua_play_anim(news_23_pre_anim_h) 
  67. 	if Hud_msg_doc ~= nil or Hud_msg_doc ~= 0 then 
  68. 		hud_msg_subtitle_top() 
  69. 	end 
  70. end 
  71.  
  72. function cte_news_23out_6() 
  73. 	vint_set_property(News_23_pre_grp_h, "visible", false) 
  74. 	if Hud_msg_doc ~= nil or Hud_msg_doc ~= 0 then 
  75. 		hud_msg_subtitle_bottom() 
  76. 	end 
  77. end 
  78.  
  79.  
  80. function cte_news_23out_12() 
  81. 	local news_23_anim_h = vint_object_find("news_23_anim") 
  82. 	local news_23_ticker_h = vint_object_find("ticker_txt_23") 
  83. 	vint_set_property(News_23_grp_h, "visible", true) 
  84. 	vint_set_property(news_23_ticker_h, "text_tag", "...Memorial service for boy trampled to death by elephant to be held tomorrow...Saints Flow recalled after recent positive tests for HGH...Free cheeseburger day at Freckle Bitch's leaves 6 dead; dozens more injured...") 
  85. 	lua_play_anim(news_23_anim_h) 
  86. 	if Hud_msg_doc ~= nil or Hud_msg_doc ~= 0 then 
  87. 		hud_msg_subtitle_top() 
  88. 	end 
  89. end 
  90.  
  91. function cte_news_23out_15() 
  92. 	vint_set_property(News_23_grp_h, "visible", false) 
  93. 	if Hud_msg_doc ~= nil or Hud_msg_doc ~= 0 then 
  94. 		hud_msg_subtitle_bottom() 
  95. 	end 
  96. end 
  97.  
  98. ------------- 
  99. --span 09 
  100. ------------- 
  101.  
  102. function cte_news_09out_11() 
  103. 	local span_09_anim_h = vint_object_find("span_09_anim") 
  104. 	vint_set_property(Span_09_grp_h, "visible", true) 
  105. 	lua_play_anim(span_09_anim_h) 
  106. 	if Hud_msg_doc ~= nil or Hud_msg_doc ~= 0 then 
  107. 		hud_msg_subtitle_top() 
  108. 	end 
  109. end 
  110.  
  111. ------------- 
  112. --span ms 
  113. ------------- 
  114.  
  115. function cte_news_ms_4() 
  116. 	vint_set_property(Span_ms_grp_h, "visible", true) 
  117. 	lua_play_anim(Span_ms_anim_h) 
  118. 	if Hud_msg_doc ~= nil or Hud_msg_doc ~= 0 then 
  119. 		hud_msg_subtitle_top() 
  120. 	end 
  121. end 
  122.  
  123. function cte_news_ms_5() 
  124. 	vint_set_property(Span_ms_grp_h, "visible",false) 
  125. 	if Hud_msg_doc ~= nil or Hud_msg_doc ~= 0 then 
  126. 		hud_msg_subtitle_bottom() 
  127. 	end 
  128. end 
  129.  
  130.  
  131. function cte_news_ms_6() 
  132. 	vint_set_property(Span_ms_grp_h, "visible", true) 
  133. 	lua_play_anim(Span_ms_anim_h) 
  134. 	if Hud_msg_doc ~= nil or Hud_msg_doc ~= 0 then 
  135. 		hud_msg_subtitle_top() 
  136. 	end 
  137. end 
  138.  
  139. function cte_news_ms_7() 
  140. 	vint_set_property(Span_ms_grp_h, "visible",false) 
  141. 	if Hud_msg_doc ~= nil or Hud_msg_doc ~= 0 then 
  142. 		hud_msg_subtitle_bottom() 
  143. 	end 
  144. end 
  145.  
  146.  
  147. function cte_news_ms_8() 
  148. 	vint_set_property(Span_ms_grp_h, "visible", true) 
  149. 	lua_play_anim(Span_ms_anim_h) 
  150. 	if Hud_msg_doc ~= nil or Hud_msg_doc ~= 0 then 
  151. 		hud_msg_subtitle_top() 
  152. 	end 
  153. end 
  154.  
  155. function cte_news_ms_9() 
  156. 	vint_set_property(Span_ms_grp_h, "visible",false) 
  157. 	if Hud_msg_doc ~= nil or Hud_msg_doc ~= 0 then 
  158. 		hud_msg_subtitle_bottom() 
  159. 	end 
  160. end 
  161.  
  162. ------------- 
  163. --span ms jumbo 
  164. ------------- 
  165.  
  166. function cte_news_ms_jumbo_1() 
  167. 	vint_set_property(Span_ms_grp_h, "visible", true) 
  168. 	lua_play_anim(Span_ms_anim_h) 
  169. end 
  170.  
  171. ------------- 
  172. --psa 
  173. ------------- 
  174.  
  175. function cte_news_11out_7() 
  176. 	local psa_anim_h = vint_object_find("psa_anim") 
  177. 	vint_set_property(Psa_grp_h, "visible", true) 
  178. 	lua_play_anim(psa_anim_h) 
  179. end 
  180.  
  181. function cte_news_11out_8() 
  182. 	vint_set_property(Psa_grp_h, "visible", false) 
  183. end 
  184.  
  185.  
  186. function cte_news_cleanup() 
  187. 	if Hud_msg_doc ~= nil or Hud_msg_doc ~= 0 then 
  188. 		hud_msg_subtitle_bottom() 
  189. 	end 
  190. 	 
  191. 	--restore pause map... 
  192. 	pause_map_restore() 
  193. end 
  194.