Advertisement
HyperVoice

Untitled

Feb 11th, 2016
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.22 KB | None | 0 0
  1. {$CLEO .cs}
  2. 0000: NOP
  3.  
  4. const
  5. SCRIPT_VERSION = 4
  6.  
  7. UPDATEINFO_FILE = "infobar_update.txt"
  8. CHANGELOG_FILE = "infobar_changelog.txt"
  9.  
  10. TIMER_OFFSET = 0xB7CB84
  11. end
  12.  
  13.  
  14. while not Samp.Available()
  15. wait 400
  16. end
  17.  
  18. wait 1000
  19. 0B34: samp register_client_command "infobar" to_label @sb2
  20. 0B34: samp register_client_command "infobar_move" to_label @sb3
  21. 0B34: samp register_client_command "carinfobar_move" to_label @sb4
  22.  
  23. alloc 10@ 128
  24. alloc 11@ 128
  25. alloc 12@ 128
  26. alloc 13@ 128
  27. alloc 14@ 128
  28. alloc 15@ 128
  29. alloc 16@ 128
  30. alloc 17@ 128
  31. alloc 18@ 128
  32. alloc 19@ 128
  33. alloc 20@ 128
  34. alloc 21@ 128
  35. alloc 22@ 128
  36. alloc 23@ 128
  37. alloc 24@ 128
  38. alloc 25@ 128
  39. alloc $namecar 128
  40. alloc 26@ 128
  41. alloc $doorcar 128
  42. alloc 27@ 128
  43. alloc 28@ 128
  44. alloc $weaponidinarms 128
  45. alloc $wantedlvl 128
  46. alloc $Timeonyourpc 128
  47. alloc $interioractive 128
  48. alloc $getAmmoInClip 128
  49. alloc $nameofweapon 128
  50. alloc $showfps228 128
  51. alloc $background 256
  52. alloc $fontforinfobar 256
  53.  
  54. if
  55. 8AE4: not directory_exists "Cleo\INI"
  56. then
  57. 0AE5: create_directory "Cleo\INI"
  58. end
  59. if
  60. 0AAB: file_exists "CLEO\INI\infobar.ini"
  61. then
  62. 0AF0: $AutoEnable = get_int_from_ini_file "cleo\INI\infobar.ini" section "AutoEnable" key "AutoEnable"
  63. 0AF0: $OnfootPosX = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  64. 0AF0: $OnfootPosY = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  65. 0AF0: $IncarPosX = get_int_from_ini_file "cleo\INI\infobar.ini" section "Incar" key "PosX"
  66. 0AF0: $IncarPosY = get_int_from_ini_file "cleo\INI\infobar.ini" section "Incar" key "PosY"
  67. 0AF4: $background = read_string_from_ini_file "cleo\INI\infobar.ini" section "background" key "The path to the background"
  68. 0AF4: $fontforinfobar = read_string_from_ini_file "cleo\INI\infobar.ini" section "Font" key "Name font"
  69. 0AF0: $ClearScreen = get_int_from_ini_file "cleo\INI\infobar.ini" section "ClearScreen" key "ClearScreen"
  70. else
  71. 0AF1: write_int 1 to_ini_file "CLEO\INI\infobar.ini" section "AutoEnable" key "AutoEnable"
  72. 0AF1: write_int 1059 to_ini_file "CLEO\INI\infobar.ini" section "Onfoot" key "PosX"
  73. 0AF1: write_int 416 to_ini_file "CLEO\INI\infobar.ini" section "Onfoot" key "PosY"
  74. 0AF1: write_int 1059 to_ini_file "CLEO\INI\infobar.ini" section "Incar" key "PosX"
  75. 0AF1: write_int 567 to_ini_file "CLEO\INI\infobar.ini" section "Incar" key "PosY"
  76. 0AF5: write_string "CLEO\INI\info3.png" to_ini_file "cleo\INI\infobar.ini" section "background" key "The path to the background"
  77. 0AF5: write_string "Arial" to_ini_file "cleo\INI\infobar.ini" section "Font" key "Name font"
  78. 0AF1: write_int 1 to_ini_file "CLEO\INI\infobar.ini" section "ClearScreen" key "ClearScreen"
  79. end
  80.  
  81.  
  82. 0B6D: render 9@ = create_font $fontforinfobar height 9 flags 5
  83.  
  84. 0B71: render 0@ = load_texture_from_file $background
  85.  
  86. 0AB1: call_scm_func @check_updates 1 current_version SCRIPT_VERSION
  87.  
  88. var
  89. 2@ : Float
  90. 4@ : Float
  91. end
  92. 0AF0: 4@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "AutoEnable" key "AutoEnable"
  93. 2@ = 4@
  94.  
  95.  
  96. $showfps0 = 0.0
  97. $showfps1 = 0.0
  98. $showfps2 = 0.0
  99. $showfps3 = 0.0
  100. $showfps4 = 0.0
  101. $showfps5 = 0
  102. $showfps6 = 0.0
  103.  
  104. While true
  105. wait 0
  106. if
  107. 2@ == 1
  108. then
  109. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  110. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  111. 0B73: render draw_texture 0@ pos 5@ 6@ size 285 140 rotation 0.0 color -1
  112. 0AB1: Call @GetLocalTime 0 wYear $SystemTime4 wMonth $SystemTime5 wDayOfWeek $SystemTime6 wDay $SystemTime7 wHour $SystemTime8 wMinute $SystemTime9 wSeconds $SystemTime10 wMiliseconds $SystemTime11
  113. format $Timeonyourpc "%d:%d:%d" $SystemTime8 $SystemTime9 $SystemTime10
  114. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  115. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  116. 5@ += 10
  117. 6@ -= 10
  118. 0B6F: render font 9@ draw_text $Timeonyourpc pos 5@ 6@ color 0xFF8FBC8F
  119. 0B2B: samp $id = get_player_id_by_actor_handle $PLAYER_ACTOR
  120. format 10@ "ID: %d" $id
  121. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  122. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  123. 5@ += 10
  124. 6@ += 5
  125. 0B6F: render font 9@ draw_text 10@ pos 5@ 6@ color 0xFF8FBC8F
  126. 0B36: samp $nick = get_player_nickname $id
  127. format 11@ "Nick: %s" $nick
  128. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  129. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  130. 5@ += 90
  131. 6@ += 5
  132. 0B6F: render font 9@ draw_text 11@ pos 5@ 6@ color 0xFF8FBC8F
  133. 0B2A: samp $ping = get_player_ping $id
  134. format 12@ "Ping: %d" $ping
  135. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  136. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  137. 5@ += 10
  138. 6@ += 20
  139. 0B6F: render font 9@ draw_text 12@ pos 5@ 6@ color 0xFF8FBC8F
  140. $Healthpoint = Actor.Health($PLAYER_ACTOR)
  141. format 13@ "HP: %d" $Healthpoint
  142. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  143. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  144. 5@ += 90
  145. 6@ += 20
  146. 0B6F: render font 9@ draw_text 13@ pos 5@ 6@ color 0xFF8FBC8F
  147. 077E: get_active_interior_to $Idinterior
  148. format $interioractive "interior: %d" $Idinterior
  149. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  150. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  151. 5@ += 170
  152. 6@ += 20
  153. 0B6F: render font 9@ draw_text $interioractive pos 5@ 6@ color 0xFF8FBC8F
  154. 0AB1: @getWantedLevel 0 return_to $lvlwanted
  155. format $wantedlvl "Wanted lvl: %d" $lvlwanted
  156. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  157. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  158. 5@ += 170
  159. 6@ += 35
  160. 0B6F: render font 9@ draw_text $wantedlvl pos 5@ 6@ color 0xFF8FBC8F
  161. 04DD: $Bronya = actor $PLAYER_ACTOR armour
  162. format 14@ "Armour: %d" $Bronya
  163. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  164. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  165. 5@ += 10
  166. 6@ += 35
  167. 0B6F: render font 9@ draw_text 14@ pos 5@ 6@ color 0xFF8FBC8F
  168. 0665: get_actor $PLAYER_ACTOR model_to $Skinactora
  169. format 15@ "Skin: %d" $Skinactora
  170. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  171. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  172. 5@ += 90
  173. 6@ += 35
  174. 0B6F: render font 9@ draw_text 15@ pos 5@ 6@ color 0xFF8FBC8F
  175. $Dengi = Player.Money($PLAYER_CHAR)
  176. format 16@ "Money: %d" $Dengi
  177. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  178. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  179. 5@ += 10
  180. 6@ += 50
  181. 0B6F: render font 9@ draw_text 16@ pos 5@ 6@ color 0xFF8FBC8F
  182. 8@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
  183. $Animka = SAMP.PlayerAnimationID(8@)
  184. format 17@ "Anim ID: %d" $Animka
  185. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  186. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  187. 5@ += 10
  188. 6@ += 65
  189. 0B6F: render font 9@ draw_text 17@ pos 5@ 6@ color 0xFF8FBC8F
  190. $DialogID = SAMP.GetDialogID()
  191. format 18@ "Dialog ID: %d" $DialogID
  192. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  193. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  194. 5@ += 10
  195. 6@ += 80
  196. 0B6F: render font 9@ draw_text 18@ pos 5@ 6@ color 0xFF8FBC8F
  197. Actor.StorePos($player_actor, $Q $W $E)
  198. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  199. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  200. format 19@ "X: %0.2f" $Q
  201. 5@ += 130
  202. 6@ += 50
  203. 0B6F: render font 9@ draw_text 19@ pos 5@ 6@ color 0xFF8FBC8F
  204. format 20@ "Y: %0.2f" $W
  205. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  206. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  207. 5@ += 130
  208. 6@ += 65
  209. 0B6F: render font 9@ draw_text 20@ p os 5@ 6@ color 0xFF8FBC8F
  210. format 21@ "Z: %0.2f" $E
  211. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  212. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  213. 5@ += 130
  214. 6@ += 80
  215. 0B6F: render font 9@ draw_text 21@ pos 5@ 6@ color 0xFF8FBC8F
  216. 0470: 1@ = actor $PLAYER_ACTOR current_weapon
  217. format $weaponidinarms "Weapon ID: %d" 1@
  218. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  219. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  220. 5@ += 10
  221. 6@ += 95
  222. 0B6F: render font 9@ draw_text $weaponidinarms pos 5@ 6@ color 0xFF8FBC8F
  223. 0AB1: call @getAmmoInClip 0 return: $ammoinclip
  224. format $getAmmoInClip "Ammo In Clip: %d" $ammoinclip
  225. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  226. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  227. 5@ += 130
  228. 6@ += 95
  229. 0B6F: render font 9@ draw_text $getAmmoInClip pos 5@ 6@ color 0xFF8FBC8F
  230. 0470: 1@ = actor $PLAYER_ACTOR current_weapon
  231. 0AB1: call @get_weapon_name_by_id 1 id 1@ to 1@
  232. format $nameofweapon "Weapon Name: %s" 1@
  233. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  234. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  235. 5@ += 10
  236. 6@ += 110
  237. 0B6F: render font 9@ draw_text $nameofweapon pos 5@ 6@ color 0xFF8FBC8F
  238. call @FPS 7 in $showfps0 $showfps1 $showfps2 $showfps3 $showfps4 $showfps5 $showfps6 out $showfps0 $showfps1 $showfps2 $showfps3 $showfps4 $showfps5 $showfps6
  239. 0092: $showfps8 = float $showfps6 to_integer
  240. format $showfps228 "Fps: %d" $showfps8
  241. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  242. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  243. 5@ += 200
  244. 6@ -= 10
  245. 0B6F: render font 9@ draw_text $showfps228 pos 5@ 6@ color 0xFF8FBC8F
  246. if Actor.Driving($PLAYER_ACTOR)
  247. then
  248. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
  249. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
  250. 0B73: render draw_texture 0@ pos 5@ 6@ size 285 75 rotation 0.0 color -1
  251. $thiscar = Actor.CurrentCar($PLAYER_ACTOR)
  252. $idcar = SAMP.GetSAMPVehicleIDByCarHandle($thiscar)
  253. format 22@ "Vehicle ID: %d" $idcar
  254. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
  255. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
  256. 5@ += 10
  257. 6@ += 5
  258. 0B6F: render font 9@ draw_text 22@ pos 5@ 6@ color 0xFF8FBC8F
  259. 02E3: 1@ = car $thiscar speed
  260. 0092: 3@ = float 1@ to_integer
  261. 3@ *= 2.1
  262. format 23@ "Speed: %d" 3@
  263. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
  264. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
  265. 5@ += 130
  266. 6@ += 5
  267. 0B6F: render font 9@ draw_text 23@ pos 5@ 6@ color 0xFF8FBC8F
  268. 03F3: get_car $thiscar primary_color_to 1@ secondary_color_to 7@
  269. format 24@ "Color car 1: %d" 1@
  270. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
  271. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
  272. 5@ += 10
  273. 6@ += 20
  274. 0B6F: render font 9@ draw_text 24@ pos 5@ 6@ color 0xFF8FBC8F
  275. 1@ = Actor.CurrentCar($PLAYER_ACTOR)
  276. 03F3: get_car $thiscar primary_color_to 7@ secondary_color_to 1@
  277. format 25@ "Color car 2: %d" 1@
  278. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
  279. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
  280. 5@ += 130
  281. 6@ += 20
  282. 0B6F: render font 9@ draw_text 25@ pos 5@ 6@ color 0xFF8FBC8F
  283. $modelcar = Car.Model($thiscar)
  284. 0ADB: $namecar = car_model $modelcar name
  285. format 26@ "Car Name: %s" $namecar
  286. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
  287. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
  288. 5@ += 130
  289. 6@ += 35
  290. 0B6F: render font 9@ draw_text 26@ pos 5@ 6@ color 0xFF8FBC8F
  291. 09B3: get_car $thiscar door_status $104
  292. if $104 == 0
  293. then
  294. format $doorcar "Door: Open"
  295. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
  296. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
  297. 5@ += 10
  298. 6@ += 35
  299. 0B6F: render font 9@ draw_text $doorcar pos 5@ 6@ color 0xFF8FBC8F
  300. else
  301. format $doorcar "Door: Close"
  302. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
  303. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
  304. 5@ += 10
  305. 6@ += 35
  306. 0B6F: render font 9@ draw_text $doorcar pos 5@ 6@ color 0xFF8FBC8F
  307. end
  308. if
  309. 0ABE: vehicle $thiscar engine_on
  310. then
  311. format 27@ "Engine: ON"
  312. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
  313. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
  314. 5@ += 10
  315. 6@ += 50
  316. 0B6F: render font 9@ draw_text 27@ pos 5@ 6@ color 0xFF8FBC8F
  317. else
  318. format 27@ "Engine: OFF"
  319. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
  320. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
  321. 5@ += 10
  322. 6@ += 50
  323. 0B6F: render font 9@ draw_text 27@ pos 5@ 6@ color 0xFF8FBC8F
  324. end
  325. $thiscar = Car.Health($thiscar)
  326. format 28@ "HP(car): %d" $thiscar
  327. 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
  328. 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
  329. 5@ += 130
  330. 6@ += 50
  331. 0B6F: render font 9@ draw_text 28@ pos 5@ 6@ color 0xFF8FBC8F
  332. end
  333. end
  334. if
  335. $moveinfobar == 1
  336. then
  337. SAMP.SetCursorMode(2)
  338. 0B5E: get_cursor_pos $moveinfobarX $moveinfobarY
  339. 0AF1: write_int $moveinfobarX to_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
  340. 0AF1: write_int $moveinfobarY to_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
  341. end
  342. if
  343. $movecarinfobar == 1
  344. then
  345. SAMP.SetCursorMode(2)
  346. 0B5E: get_cursor_pos $movecarinfobarX $movecarinfobarY
  347. 0AF1: write_int $movecarinfobarX to_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
  348. 0AF1: write_int $movecarinfobarY to_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
  349. end
  350. 0AF0: $ClearScreen = get_int_from_ini_file "cleo\INI\infobar.ini" section "ClearScreen" key "ClearScreen"
  351. if and
  352. $ClearScreen == 1
  353. 2@ == 1
  354. key_down 119
  355. then
  356. 2@ = 0
  357. wait 500
  358. 2@ = 1
  359. end
  360. end
  361.  
  362. :sb2
  363. if
  364. 2@ == 1
  365. then
  366. 2@ = 0
  367. free 10@
  368. free 11@
  369. free 12@
  370. free 13@
  371. free 14@
  372. free 15@
  373. free 16@
  374. free 17@
  375. free 18@
  376. free 19@
  377. free 20@
  378. free 21@
  379. free 22@
  380. free 23@
  381. free 24@
  382. free 25@
  383. free $namecar
  384. free 26@
  385. free $doorcar
  386. free 27@
  387. free 28@
  388. free $weaponidinarms
  389. free $nameofweapon
  390. free $wantedlvl
  391. free $Timeonyourpc
  392. free $interioractive
  393. free $getAmmoInClip
  394. free $showfps228
  395. else
  396. 2@ = 1
  397. alloc 10@ 128
  398. alloc 11@ 128
  399. alloc 12@ 128
  400. alloc 13@ 128
  401. alloc 14@ 128
  402. alloc 15@ 128
  403. alloc 16@ 128
  404. alloc 17@ 128
  405. alloc 18@ 128
  406. alloc 19@ 128
  407. alloc 20@ 128
  408. alloc 21@ 128
  409. alloc 22@ 128
  410. alloc 23@ 128
  411. alloc 24@ 128
  412. alloc 25@ 128
  413. alloc $namecar 128
  414. alloc 26@ 128
  415. alloc $doorcar 128
  416. alloc 27@ 128
  417. alloc 28@ 128
  418. alloc $weaponidinarms 128
  419. alloc $nameofweapon 128
  420. alloc $wantedlvl 128
  421. alloc $Timeonyourpc 128
  422. alloc $interioractive 128
  423. alloc $getAmmoInClip 128
  424. alloc $showfps228 128
  425. end
  426. SAMP.CmdRet()
  427.  
  428. :sb3
  429. if $moveinfobar == 1
  430. then
  431. $moveinfobar = 0
  432. 0AF8: samp add_message_to_chat "Ïåğìåùåíèå âûêë." color -1
  433. else
  434. $moveinfobar = 1
  435. 0AF8: samp add_message_to_chat "Ïåğìåùåíèå âêë." color -1
  436. end
  437. SAMP.CmdRet()
  438.  
  439. :sb4
  440. if $movecarinfobar == 1
  441. then
  442. $movecarinfobar = 0
  443. 0AF8: samp add_message_to_chat "Ïåğìåùåíèå âûêë." color -1
  444. else
  445. if Actor.Driving($PLAYER_ACTOR)
  446. then
  447. $movecarinfobar = 1
  448. 0AF8: samp add_message_to_chat "Ïåğìåùåíèå âêë." color -1
  449. else 0AF8: samp add_message_to_chat "Íåîáõîäèìî áûòü â ìàøèíå" color -1
  450. end
  451. end
  452. SAMP.CmdRet()
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459. :FPS
  460. // in: 0@ - frameCounter, 1@, 2@, 3@, 4@ - fpsBuf, 5@ - fpsTime, 6@ - fpsDisplay. out: 0@ - frameCounter, 1@, 2@, 3@, 4@ - fpsBuf, 5@ - fpsTime, 6@ - fpsDisplay
  461. $showfps0 += 1.0 // fpsFrameCounter++;
  462. 0A8D: $showfps7 = read_memory TIMER_OFFSET size 4 virtual_protect 0 // GetTickCount
  463. 0085: $showfps8 = $showfps7 // (int)
  464. 0062: $showfps7 -= $showfps5 // (int)
  465. if $showfps7 > 240 // if ( (GetTickCount() - 240) > fps_time )
  466. then
  467. 0087: $showfps4 = $showfps3 // fpsBuf4 = fpsBuf3;
  468. 0087: $showfps3 = $showfps2 // fpsBuf3 = fpsBuf2;
  469. 0087: $showfps2 = $showfps1 // fpsBuf2 = fpsBuf1;
  470.  
  471. // fpsBuf1 = ( fpsFrameCounter * 4 );
  472. 0087: $showfps1 = $showfps0
  473. $showfps1 *= 4.0
  474.  
  475. // fpsDisplay = ( fpsBuf1 + fpsBuf2 + fpsBuf3 + fpsBuf4 ) / 4.0;
  476. 0087: $showfps6 = $showfps1
  477. 005B: $showfps6 += $showfps2 // (float)
  478. 005B: $showfps6 += $showfps3 // (float)
  479. 005B: $showfps6 += $showfps4 // (float)
  480. $showfps6 /= 4.0
  481.  
  482. // fpsFrameCounter = 0;
  483. $showfps0 = 0.0
  484.  
  485. // fps_time = GetTickCount();
  486. 0085: $showfps5 = $showfps8
  487. end
  488. ret 7 $showfps0 $showfps1 $showfps2 $showfps3 $showfps4 $showfps5 $showfps6
  489.  
  490. :get_weapon_name_by_id
  491. {
  492. Params:
  493. In: 0@ - WeaponID
  494. Out: 1@ - weaponName
  495.  
  496. Example: call @get_weapon_name_by_id 1 id 0@ to 1@
  497. }
  498. 0AC6: 1@ = label @weapons offset
  499. 0@ *= 19
  500. 005A: 1@ += 0@ // (int)
  501. ret 1 1@
  502.  
  503. :weapons
  504. hex
  505. "Duke" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 0 }
  506. "Brass Knuckles" 00 00 00 00 00 { 1 }
  507. "Golf Club" 00 00 00 00 00 00 00 00 00 00 { 2 }
  508. "Nite Stick" 00 00 00 00 00 00 00 00 00 { 3 }
  509. "Knife" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 4 }
  510. "Baseball" 00 00 00 00 00 00 00 00 00 00 00 { 5 }
  511. "Shovel" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 6 }
  512. "Pool Cue" 00 00 00 00 00 00 00 00 00 00 00 { 7 }
  513. "Katana" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 8 }
  514. "Chainsaw" 00 00 00 00 00 00 00 00 00 00 00 { 9 }
  515. "Dildo" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 10 }
  516. "Dildo" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 11 }
  517. "Dildo" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 12 }
  518. "Dildo" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 13 }
  519. "Flowers" 00 00 00 00 00 00 00 00 00 00 00 00 { 14 }
  520. "Cane" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 15 }
  521. "Grenade" 00 00 00 00 00 00 00 00 00 00 00 00 { 16 }
  522. "Tear Gas" 00 00 00 00 00 00 00 00 00 00 00 { 17 }
  523. "Molotov" 00 00 00 00 00 00 00 00 00 00 00 00 { 18 }
  524. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 19 }
  525. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 20 }
  526. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 21 }
  527. "Pistol" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 22 }
  528. "Silencer" 00 00 00 00 00 00 00 00 00 00 00 { 23 }
  529. "Deagle" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 24 }
  530. "Shotgun" 00 00 00 00 00 00 00 00 00 00 00 00 { 25 }
  531. "SawnOff" 00 00 00 00 00 00 00 00 00 00 00 00 { 26 }
  532. "Spas12" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 27 }
  533. "Tec9" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 28 }
  534. "MP5" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 29 }
  535. "AK47" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 30 }
  536. "M4" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 31 }
  537. "Mac10" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 32 }
  538. "Rifle" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 33 }
  539. "Sniper" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 34 }
  540. "Rocket Launcher" 00 00 00 00 { 35 }
  541. "HS Rocket Launcher" 00 { 36 }
  542. "Flamethrower" 00 00 00 00 00 00 00 { 37 }
  543. "Minigun" 00 00 00 00 00 00 00 00 00 00 00 00 { 38 }
  544. "C4" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 39 }
  545. "Detonator" 00 00 00 00 00 00 00 00 00 00 { 40 }
  546. "Spray" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 41 }
  547. "Fire Extinguisher" 00 00 { 42 }
  548. "Camera" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 43 }
  549. "Nightvision" 00 00 00 00 00 00 00 00 { 44 }
  550. "Infrared Vision" 00 00 00 00 { 45 }
  551. "Parachute" 00 00 00 00 00 00 00 00 00 00 { 46 }
  552. end
  553.  
  554. :getAmmoInClip
  555. 0A96: 0@ = actor $PLAYER_ACTOR struct
  556. 0A8E: 1@ = 0@ + 0x0718
  557. 0A8D: 1@ = read_memory 1@ size 1 virtual_protect 0
  558. 1@ *= 0x1C
  559. 0A8E: 2@ = 0@ + 0x5A0
  560. 005a: 2@ += 1@
  561. 2@ += 0x8
  562. 0A8D: 2@ = read_memory 2@ size 4 virtual_protect 0
  563. ret 1 2@
  564.  
  565. :getWantedLevel
  566. 0A8D: $lvlwanted = read_memory 0x58DB60 size 1 virtual_protect 0
  567. 0AB2: ret 1 $lvlwanted
  568.  
  569. :GetLocalTime
  570. /*
  571. Params:
  572. In: None
  573. Out: wYear 4@ wMonth 5@ wDayOfWeek 6@ wDay 7@ wHour 8@ wMinute 9@ wSeconds 10@ wMiliseconds 11@
  574.  
  575. Example:
  576. 0AB1: Call @GetLocalTime 0 wYear 4@ wMonth 5@ wDayOfWeek 6@ wDay 7@ wHour 8@ wMinute 9@ wSeconds 10@ wMiliseconds 11@
  577. */
  578. 0AA2: $SystemTime0 = load_library "kernel32.dll"
  579. 0AA4: $SystemTime1 = get_proc_address "GetLocalTime" library $SystemTime0
  580. 0AC8: $SystemTime2 = alloc mem 16
  581. 0AA5: call $SystemTime1 params 1 pop 0 $SystemTime2
  582. 0085: $SystemTime3 = $SystemTime2
  583.  
  584. 0A8D: $SystemTime4 = read mem $SystemTime3 size 2 vp 0 // wYear
  585. $SystemTime3 += 2
  586.  
  587. 0A8D: $SystemTime5 = read mem $SystemTime3 size 2 vp 0 // wMonth
  588. $SystemTime3 += 2
  589.  
  590. 0A8D: $SystemTime6 = read mem $SystemTime3 size 2 vp 0 // wDayOfWeek
  591. $SystemTime3 += 2
  592.  
  593. 0A8D: $SystemTime7 = read mem $SystemTime3 size 2 vp 0 // wDay
  594. $SystemTime3 += 2
  595.  
  596. 0A8D: $SystemTime8 = read mem $SystemTime3 size 2 vp 0 // wHour
  597. $SystemTime3 += 2
  598.  
  599. 0A8D: $SystemTime9 = read mem $SystemTime3 size 2 vp 0 // wMinute
  600. $SystemTime3 += 2
  601.  
  602. 0A8D: $SystemTime10 = read mem $SystemTime3 size 2 vp 0 // wSecond
  603. $SystemTime3 += 2
  604.  
  605. 0A8D: $SystemTime11 = read mem $SystemTime3 size 2 vp 0 // wMilliseconds
  606.  
  607. 0AC9: free_allocated_memory $SystemTime2
  608. ret 8 $SystemTime4 $SystemTime5 $SystemTime6 $SystemTime7 $SystemTime8 $SystemTime9 $SystemTime10 $SystemTime11
  609.  
  610.  
  611. :download_check_status
  612. 1@ = -1
  613. while 1@ == -1
  614. wait 0
  615. 0C66: 1@ = get_download 0@ state
  616. end
  617. 0AB2: ret 1 1@
  618.  
  619. :url_fileupdateinfo
  620. hex
  621. "http:" "/" "/" "chekobnova.hol.es/infobar.txt" 00
  622. end
  623.  
  624. :check_updates
  625. 0AC6: 1@ = label @url_fileupdateinfo offset
  626. 0C65: 1@ = download_url 1@ to_file UPDATEINFO_FILE
  627. 0AB1: call_scm_func @download_check_status 1 download_n 1@ status_to 2@
  628. 0C7D: release_download 1@
  629.  
  630. if 2@ <> 0
  631. then
  632. 0AF8: samp add_message_to_chat "Ïğîèçîøëà îøèáêà âî âğåìÿ çàãğóçêè. Îøèáêà %p" color -1 2@
  633. else // èíà÷å
  634. 0AF8: samp add_message_to_chat "Çàãğóçêà óñïåøíî çàâåğøåíà." color -1
  635.  
  636. if 0AAB: file_exists UPDATEINFO_FILE
  637. then
  638. 0AF0: 3@ = get_int_from_ini_file UPDATEINFO_FILE section "UPDATE" key "version"
  639. if 001D: 3@ > 0@
  640. then
  641. 0AF8: samp add_message_to_chat "Äîñòóïíà íîâàÿ âåğñèÿ îáíîâëåíèÿ ¹%d äëÿ {FFFF00}infobar" color -1 3@
  642.  
  643. 0AC8: 4@ = allocate_memory_size 260
  644. 0C11: memset destination 4@ value 0 size 260
  645.  
  646. 0AF4: 4@ = read_string_from_ini_file UPDATEINFO_FILE section "UPDATE" key "changelog_url"
  647. 0C65: 1@ = download_url 4@ to_file CHANGELOG_FILE
  648. 0AB1: call_scm_func @download_check_status 1 download_n 1@ status_to 2@
  649. 0C7D: release_download 1@
  650.  
  651. if 2@ == 0
  652. then
  653. 0AB1: call_scm_func @show_changelog 0
  654.  
  655. end
  656.  
  657. // -------
  658. 0C11: memset destination 4@ value 0 size 260
  659. 0AF4: 4@ = read_string_from_ini_file UPDATEINFO_FILE section "UPDATE" key "script_url"
  660. 0C65: 1@ = download_url 4@ to_file "cleo/infobar.cs"
  661. 0AB1: call_scm_func @download_check_status 1 download_n 1@ status_to 2@
  662. 0C7D: release_download 1@
  663.  
  664. if 2@ == 0
  665. then
  666. 0AF8: samp add_message_to_chat "Îáíîâëåíèå çàâåğøåíî." color -1
  667. 0AF8: samp add_message_to_chat "Ïåğåçàïóñòèòå èãğó." color -1
  668. else
  669. 0AF8: samp add_message_to_chat "Ïğîèçîøëà îøèáêà ïğè îáíîâëåíèè." color -1
  670. end
  671.  
  672. 0AC9: free_allocated_memory 4@
  673. end
  674. end
  675. end
  676. 0AB2: ret 0
  677.  
  678. :show_changelog
  679. if 0A9A: 0@ = openfile CHANGELOG_FILE mode "rt"
  680. then
  681. 0AC8: 1@ = allocate_memory_size 96
  682. 0C11: memset destination 1@ value 0 size 96
  683.  
  684. 0A9C: 2@ = file 0@ size
  685. 2@++
  686.  
  687. 0AC8: 4@ = allocate_memory_size 2@
  688. 0C11: memset destination 4@ value 0 size 2@
  689. repeat
  690. 0AD7: read_string_from_file 0@ to 1@ size 95
  691. 0C17: 3@ = strlen 1@
  692. if 3@ > 0
  693. then
  694. 0C15: strcat destination 4@ source 1@
  695. end
  696. until 0AD6: end_of_file 0@ reached
  697.  
  698. 0B3B: samp show_dialog id 335 caption "{FFFF00}Ñïèñîê èçìåíåíèé {FFFFFF}infobar" text 4@ button_1 "ÎÊ" button_2 "" style 0
  699.  
  700. 0AC9: free_allocated_memory 4@
  701.  
  702. 0AC9: free_allocated_memory 1@
  703. 0A9B: closefile 0@
  704. end
  705. 0AB2: ret 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement