Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {$CLEO}
- 0000:
- repeat
- wait 0
- until Samp.Available()
- 0B60: convert_game_screen_coords 500.0 375.0 to_window_screen_coords 0@ 1@
- if 0AAB: not file_exists "CLEO\HUDset.ini"
- then
- 0AF1: 0@ "CLEO\HUDset.ini" "POSITION" "POSX"
- 0AF1: 1@ "CLEO\HUDset.ini" "POSITION" "POSY"
- end
- 0B34: "chudpos" @chudpos
- 03F0: enable_text_draw 1
- 0B6D: render 31@ = create_font "DS Crystal" height 9 flags 5
- alloc 10@ 64
- while true
- wait 0
- if and
- 8BD5: samp is_scoreboard_opened // IF and SET
- 0BDB: samp is_chat_visible // IF and SET
- then
- 0AF0: 0@ "CLEO\HUDset.ini" "POSITION" "POSX"
- 0AF0: 1@ "CLEO\HUDset.ini" "POSITION" "POSY"
- call @convert_X_size_G_to_W 1 150.0 3@
- call @convert_Y_size_G_to_W 1 15.0 4@
- call @convert_Y_size_G_to_W 1 5.0 9@
- 0470: 2@ = actor $PLAYER_ACTOR current_weapon
- call @get_weapon_name_by_id 1 id 2@ to 2@
- 0AD3: 10@ = format "%s" 2@
- //0B60: convert_game_screen_coords 0@ 1@ to_window_screen_coords 2@ 3@ // Ïåðåâîäèì ýòè êîîðäèíàòû
- 0A8E: 17@ = 1@ + -10 // int
- 0B6F: render font 31@ draw_text 10@ pos 0@ 17@ color 0xFFFFFFFF
- 0470: 2@ = actor $PLAYER_ACTOR current_weapon
- if 2@ > 0
- then
- call @get_CWeapon_m_dwAmmoInClip 0 return: 5@
- call @get_CWeapon_m_dwTotalAmmo 0 return: 6@
- 000E: 6@ -= 5@
- 0AD3: 10@ = format "%d/%d" 5@ 6@
- 0B6B: render 7@ = font 31@ draw_text 10@ length
- 000A: 0@ += 3@
- 000E: 0@ -= 7@
- 000E: 0@ -= 2
- 0B6F: render font 31@ draw_text 10@ pos 0@ 17@ color 0xFFFFFFFF
- 000A: 0@ += 2
- 000A: 0@ += 7@
- 000E: 0@ -= 3@
- end
- 1@ += 15
- 2@ = Actor.Health($PLAYER_ACTOR)
- 0A8E: 18@ = 0@ + -5 // int
- if 2@ > 160
- then 2@ = 160
- end
- call @NewHB 6 pos_X 0@ pos_Y 1@ value 2@ size_X 3@ size_Y 4@ thickness 2
- 0AD3: 10@ = format "%d" 2@
- 000A: 1@ += 9@
- 000E: 18@ -= 3
- 0B6C: render 8@ = font 31@ draw_height
- 0B6B: render 7@ = font 31@ draw_text 10@ length
- 8@ /= 2
- 000E: 1@ -= 8@
- 000E: 18@ -= 7@
- 0B6F: render font 31@ draw_text 10@ pos 18@ 1@ color 0xFFFFFFFF
- 000A: 18@ += 7@
- 000A: 18@ += 3
- 000E: 1@ -= 9@
- 000A: 1@ += 8@
- 1@ -= 15
- 000A: 1@ += 4@
- 000A: 1@ += 4@
- 04DD: 2@ = actor $PLAYER_ACTOR armour
- if 2@ > 100
- then 2@ = 100
- end
- call @NewAB 6 pos_X 0@ pos_Y 1@ value 2@ size_X 3@ size_Y 4@ thickness 2
- 0AD3: 10@ = format "%d" 2@
- 000A: 1@ += 9@
- 000E: 18@ -= 3
- 0B6C: render 8@ = font 31@ draw_height
- 0B6B: render 7@ = font 31@ draw_text 10@ length
- 8@ /= 2
- 000E: 1@ -= 8@
- 000E: 18@ -= 7@
- 0B6F: render font 31@ draw_text 10@ pos 18@ 1@ color 0xFFFFFFFF
- 000A: 18@ += 7@
- 000A: 18@ += 3
- 000E: 1@ -= 9@
- 000A: 1@ += 8@
- 010B: 2@ = player $PLAYER_CHAR money
- 0AD3: 10@ = format "$%d" 2@
- 0B6B: render 7@ = font 31@ draw_text 10@ length
- 000A: 18@ += 3@
- 000E: 18@ -= 7@
- 000E: 18@ -= 2
- 000A: 1@ += 4@
- 000A: 1@ -= 2
- 0B6F: render font 31@ draw_text 10@ pos 18@ 1@ color 0xFFFFFFFF
- if 29@ == 1
- then
- 0B8D: samp set_cursor_mode 1
- 0B5E: get_cursor_pos 27@ 28@
- 0AF1: write_int 27@ to_ini_file "CLEO\HUDset.ini" "POSITION" "POSX"
- 0AF1: write_int 28@ to_ini_file "CLEO\HUDset.ini" "POSITION" "POSY"
- if key_down 1
- then 29@ = 0
- 0B8D: samp set_cursor_mode 0
- end
- end
- end
- end
- :chudpos
- 29@ = 1
- cmdret
- :NewHB
- var
- 0@:int
- 1@:int
- //2@:int
- //3@:int
- 4@:int
- 5@:int
- end
- 0B6A: render draw_box_with_border_pos 0@ 1@ size 3@ 4@ color 0xBF6d2121 border_size 5@ border_color 0xBF000000
- 008F: 3@ = integer 3@ to_float
- 008F: 2@ = integer 2@ to_float
- //msg "%.2f %.2f" -1 3@ 2@
- 3@ /= 160.0
- 0013: 3@ *= 2@
- //msg "%.2f %.2f" -1 3@ 2@
- 0@ += 5@
- 1@ += 5@
- 5@ *= 2
- 4@ -= 5@
- //4@ -= 5@
- 0092: 3@ = float 3@ to_integer
- 000E: 3@ -= 5@
- //000E: 3@ -= 5@
- 0B69: render draw_box_pos 0@ 1@ size 3@ 4@ color 0xBFd45151
- ret 0
- 0884: 0 -762621
- :NewAB
- var
- 0@:int
- 1@:int
- //2@:int
- //3@:int
- 4@:int
- 5@:int
- end
- 0B6A: render draw_box_with_border_pos 0@ 1@ size 3@ 4@ color 0xBF00738b border_size 5@ border_color 0xBF000000
- 008F: 3@ = integer 3@ to_float
- 008F: 2@ = integer 2@ to_float
- //msg "%.2f %.2f" -1 3@ 2@
- 3@ /= 100.0
- 0013: 3@ *= 2@
- //msg "%.2f %.2f" -1 3@ 2@
- 0@ += 5@
- 1@ += 5@
- 5@ *= 2
- 4@ -= 5@
- //4@ -= 5@
- 0092: 3@ = float 3@ to_integer
- 000E: 3@ -= 5@
- //000E: 3@ -= 5@
- 0B69: render draw_box_pos 0@ 1@ size 3@ 4@ color 0xBF00d3ff
- ret 0
- :get_weapon_name_by_id
- {
- Params:
- In: 0@ - WeaponID
- Out: 1@ - weaponName
- Example: call @get_weapon_name_by_id 1 id 0@ to 1@
- }
- 0AC6: 1@ = label @weapons offset
- 0@ *= 19
- 005A: 1@ += 0@ // (int)
- ret 1 1@
- :weapons
- hex
- "Fist" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 0 }
- "Brass" 20 "Knuckles" 00 00 00 00 00 { 1 }
- "Golf" 20 "Club" 00 00 00 00 00 00 00 00 00 00 { 2 }
- "Nite" 20 "Stick" 00 00 00 00 00 00 00 00 00 { 3 }
- "Knife" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 4 }
- "Baseball" 00 00 00 00 00 00 00 00 00 00 00 { 5 }
- "Shovel" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 6 }
- "Pool" 20 "Cue" 00 00 00 00 00 00 00 00 00 00 00 { 7 }
- "Katana" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 8 }
- "Chainsaw" 00 00 00 00 00 00 00 00 00 00 00 { 9 }
- "Dildo" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 10 }
- "Dildo" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 11 }
- "Dildo" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 12 }
- "Dildo" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 13 }
- "Flowers" 00 00 00 00 00 00 00 00 00 00 00 00 { 14 }
- "Cane" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 15 }
- "Grenade" 00 00 00 00 00 00 00 00 00 00 00 00 { 16 }
- "Tear" 20 "Gas" 00 00 00 00 00 00 00 00 00 00 00 { 17 }
- "Molotov" 00 00 00 00 00 00 00 00 00 00 00 00 { 18 }
- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 19 }
- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 20 }
- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 21 }
- "Pistol" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 22 }
- "Silencer" 00 00 00 00 00 00 00 00 00 00 00 { 23 }
- "Desert" 20 "Eagle" 00 00 00 00 00 00 00 { 24 }
- "Shotgun" 00 00 00 00 00 00 00 00 00 00 00 00 { 25 }
- "SawnOff" 00 00 00 00 00 00 00 00 00 00 00 00 { 26 }
- "Spas12" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 27 }
- "Tec9" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 28 }
- "MP5" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 29 }
- "AK-47" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 30 }
- "M4" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 31 }
- "Mac10" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 32 }
- "Rifle" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 33 }
- "Sniper" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 34 }
- "Rocket" 20 "Launcher" 00 00 00 00 { 35 }
- "HS" 20 "Rocket" 20 "Launcher" 00 { 36 }
- "Flamethrower" 00 00 00 00 00 00 00 { 37 }
- "Minigun" 00 00 00 00 00 00 00 00 00 00 00 00 { 38 }
- "C4" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 39 }
- "Detonator" 00 00 00 00 00 00 00 00 00 00 { 40 }
- "Spray" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 41 }
- "Fire" 20 "Extinguisher" 00 00 { 42 }
- "Camera" 00 00 00 00 00 00 00 00 00 00 00 00 00 { 43 }
- "Nightvision" 00 00 00 00 00 00 00 00 { 44 }
- "Infrared" 20 "Vision" 00 00 00 00 { 45 }
- "Parachute" 00 00 00 00 00 00 00 00 00 00 { 46 }
- end
- :convert_X_size_G_to_W
- // 0@ - X game
- 0B60: convert_game_screen_coords 100.0 0 to_window_screen_coords 1@ 0
- 0@ += 100.0
- 0B60: convert_game_screen_coords 0@ 0 to_window_screen_coords 2@ 0
- 000E: 2@ -= 1@
- ret 1 2@
- :convert_Y_size_G_to_W
- // 0@ - Y game
- 0B60: convert_game_screen_coords 0 100.0 to_window_screen_coords 0 1@
- 0@ += 100.0
- 0B60: convert_game_screen_coords 0 0@ to_window_screen_coords 0 2@
- 000E: 2@ -= 1@
- ret 1 2@
- :convert_X_size_W_to_G
- // 0 - X windows
- 0B5F: convert_window_screen_coords 100 0 to_game_screen_coords 1@ 0
- 0@ += 100
- 0B5F: convert_window_screen_coords 0@ 0 to_game_screen_coords 2@ 0
- 000E: 2@ -= 1@
- ret 1 2@
- :convert_Y_size_W_to_G
- // 0@ - Y windows
- 0B5F: convert_window_screen_coords 0 100 to_game_screen_coords 0 1@
- 0@ += 100
- 0B5F: convert_window_screen_coords 0 0@ to_game_screen_coords 0 2@
- 000E: 2@ -= 1@
- ret 1 2@
- :get_CWeapon_m_dwAmmoInClip
- 0A96: 0@ = actor $PLAYER_ACTOR struct
- 0A8E: 1@ = 0@ + 0x0718 // CPed.m_cWeaponSlot
- 0A8D: 1@ = read_memory 1@ size 1 virtual_protect 0
- 1@ *= 0x1C // sizeof(cWeaponSlot)
- 0A8E: 2@ = 0@ + 0x5A0 // CPed.m_aclWeaponSlots
- 005a: 2@ += 1@
- 2@ += 0x8 // CWeapon.m_dwState
- 0A8D: 2@ = read_memory 2@ size 4 virtual_protect 0
- ret 1 2@
- :get_CWeapon_m_dwTotalAmmo
- 0A96: 0@ = actor $PLAYER_ACTOR struct
- 0A8E: 1@ = 0@ + 0x0718 // CPed.m_cWeaponSlot
- 0A8D: 1@ = read_memory 1@ size 1 virtual_protect 0
- 1@ *= 0x1C // sizeof(cWeaponSlot)
- 0A8E: 2@ = 0@ + 0x5A0 // CPed.m_aclWeaponSlots
- 005a: 2@ += 1@
- 2@ += 0xc // CWeapon.m_dwState
- 0A8D: 2@ = read_memory 2@ size 4 virtual_protect 0
- ret 1 2@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement