Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {$CLEO .cs}
- 0000: NOP
- const
- SCRIPT_VERSION = 4
- UPDATEINFO_FILE = "infobar_update.txt"
- CHANGELOG_FILE = "infobar_changelog.txt"
- TIMER_OFFSET = 0xB7CB84
- end
- while not Samp.Available()
- wait 400
- end
- wait 1000
- 0B34: samp register_client_command "infobar" to_label @sb2
- 0B34: samp register_client_command "infobar_move" to_label @sb3
- 0B34: samp register_client_command "carinfobar_move" to_label @sb4
- alloc 10@ 128
- alloc 11@ 128
- alloc 12@ 128
- alloc 13@ 128
- alloc 14@ 128
- alloc 15@ 128
- alloc 16@ 128
- alloc 17@ 128
- alloc 18@ 128
- alloc 19@ 128
- alloc 20@ 128
- alloc 21@ 128
- alloc 22@ 128
- alloc 23@ 128
- alloc 24@ 128
- alloc 25@ 128
- alloc $namecar 128
- alloc 26@ 128
- alloc $doorcar 128
- alloc 27@ 128
- alloc 28@ 128
- alloc $weaponidinarms 128
- alloc $wantedlvl 128
- alloc $Timeonyourpc 128
- alloc $interioractive 128
- alloc $getAmmoInClip 128
- alloc $nameofweapon 128
- alloc $showfps228 128
- alloc $background 256
- alloc $fontforinfobar 256
- if
- 8AE4: not directory_exists "Cleo\INI"
- then
- 0AE5: create_directory "Cleo\INI"
- end
- if
- 0AAB: file_exists "CLEO\INI\infobar.ini"
- then
- 0AF0: $AutoEnable = get_int_from_ini_file "cleo\INI\infobar.ini" section "AutoEnable" key "AutoEnable"
- 0AF0: $OnfootPosX = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: $OnfootPosY = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- 0AF0: $IncarPosX = get_int_from_ini_file "cleo\INI\infobar.ini" section "Incar" key "PosX"
- 0AF0: $IncarPosY = get_int_from_ini_file "cleo\INI\infobar.ini" section "Incar" key "PosY"
- 0AF4: $background = read_string_from_ini_file "cleo\INI\infobar.ini" section "background" key "The path to the background"
- 0AF4: $fontforinfobar = read_string_from_ini_file "cleo\INI\infobar.ini" section "Font" key "Name font"
- 0AF0: $ClearScreen = get_int_from_ini_file "cleo\INI\infobar.ini" section "ClearScreen" key "ClearScreen"
- else
- 0AF1: write_int 1 to_ini_file "CLEO\INI\infobar.ini" section "AutoEnable" key "AutoEnable"
- 0AF1: write_int 1059 to_ini_file "CLEO\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF1: write_int 416 to_ini_file "CLEO\INI\infobar.ini" section "Onfoot" key "PosY"
- 0AF1: write_int 1059 to_ini_file "CLEO\INI\infobar.ini" section "Incar" key "PosX"
- 0AF1: write_int 567 to_ini_file "CLEO\INI\infobar.ini" section "Incar" key "PosY"
- 0AF5: write_string "CLEO\INI\info3.png" to_ini_file "cleo\INI\infobar.ini" section "background" key "The path to the background"
- 0AF5: write_string "Arial" to_ini_file "cleo\INI\infobar.ini" section "Font" key "Name font"
- 0AF1: write_int 1 to_ini_file "CLEO\INI\infobar.ini" section "ClearScreen" key "ClearScreen"
- end
- 0B6D: render 9@ = create_font $fontforinfobar height 9 flags 5
- 0B71: render 0@ = load_texture_from_file $background
- 0AB1: call_scm_func @check_updates 1 current_version SCRIPT_VERSION
- var
- 2@ : Float
- 4@ : Float
- end
- 0AF0: 4@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "AutoEnable" key "AutoEnable"
- 2@ = 4@
- $showfps0 = 0.0
- $showfps1 = 0.0
- $showfps2 = 0.0
- $showfps3 = 0.0
- $showfps4 = 0.0
- $showfps5 = 0
- $showfps6 = 0.0
- While true
- wait 0
- if
- 2@ == 1
- then
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- 0B73: render draw_texture 0@ pos 5@ 6@ size 285 140 rotation 0.0 color -1
- 0AB1: Call @GetLocalTime 0 wYear $SystemTime4 wMonth $SystemTime5 wDayOfWeek $SystemTime6 wDay $SystemTime7 wHour $SystemTime8 wMinute $SystemTime9 wSeconds $SystemTime10 wMiliseconds $SystemTime11
- format $Timeonyourpc "%d:%d:%d" $SystemTime8 $SystemTime9 $SystemTime10
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- 5@ += 10
- 6@ -= 10
- 0B6F: render font 9@ draw_text $Timeonyourpc pos 5@ 6@ color 0xFF8FBC8F
- 0B2B: samp $id = get_player_id_by_actor_handle $PLAYER_ACTOR
- format 10@ "ID: %d" $id
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- 5@ += 10
- 6@ += 5
- 0B6F: render font 9@ draw_text 10@ pos 5@ 6@ color 0xFF8FBC8F
- 0B36: samp $nick = get_player_nickname $id
- format 11@ "Nick: %s" $nick
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- 5@ += 90
- 6@ += 5
- 0B6F: render font 9@ draw_text 11@ pos 5@ 6@ color 0xFF8FBC8F
- 0B2A: samp $ping = get_player_ping $id
- format 12@ "Ping: %d" $ping
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- 5@ += 10
- 6@ += 20
- 0B6F: render font 9@ draw_text 12@ pos 5@ 6@ color 0xFF8FBC8F
- $Healthpoint = Actor.Health($PLAYER_ACTOR)
- format 13@ "HP: %d" $Healthpoint
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- 5@ += 90
- 6@ += 20
- 0B6F: render font 9@ draw_text 13@ pos 5@ 6@ color 0xFF8FBC8F
- 077E: get_active_interior_to $Idinterior
- format $interioractive "interior: %d" $Idinterior
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- 5@ += 170
- 6@ += 20
- 0B6F: render font 9@ draw_text $interioractive pos 5@ 6@ color 0xFF8FBC8F
- 0AB1: @getWantedLevel 0 return_to $lvlwanted
- format $wantedlvl "Wanted lvl: %d" $lvlwanted
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- 5@ += 170
- 6@ += 35
- 0B6F: render font 9@ draw_text $wantedlvl pos 5@ 6@ color 0xFF8FBC8F
- 04DD: $Bronya = actor $PLAYER_ACTOR armour
- format 14@ "Armour: %d" $Bronya
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- 5@ += 10
- 6@ += 35
- 0B6F: render font 9@ draw_text 14@ pos 5@ 6@ color 0xFF8FBC8F
- 0665: get_actor $PLAYER_ACTOR model_to $Skinactora
- format 15@ "Skin: %d" $Skinactora
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- 5@ += 90
- 6@ += 35
- 0B6F: render font 9@ draw_text 15@ pos 5@ 6@ color 0xFF8FBC8F
- $Dengi = Player.Money($PLAYER_CHAR)
- format 16@ "Money: %d" $Dengi
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- 5@ += 10
- 6@ += 50
- 0B6F: render font 9@ draw_text 16@ pos 5@ 6@ color 0xFF8FBC8F
- 8@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
- $Animka = SAMP.PlayerAnimationID(8@)
- format 17@ "Anim ID: %d" $Animka
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- 5@ += 10
- 6@ += 65
- 0B6F: render font 9@ draw_text 17@ pos 5@ 6@ color 0xFF8FBC8F
- $DialogID = SAMP.GetDialogID()
- format 18@ "Dialog ID: %d" $DialogID
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- 5@ += 10
- 6@ += 80
- 0B6F: render font 9@ draw_text 18@ pos 5@ 6@ color 0xFF8FBC8F
- Actor.StorePos($player_actor, $Q $W $E)
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- format 19@ "X: %0.2f" $Q
- 5@ += 130
- 6@ += 50
- 0B6F: render font 9@ draw_text 19@ pos 5@ 6@ color 0xFF8FBC8F
- format 20@ "Y: %0.2f" $W
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- 5@ += 130
- 6@ += 65
- 0B6F: render font 9@ draw_text 20@ p os 5@ 6@ color 0xFF8FBC8F
- format 21@ "Z: %0.2f" $E
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- 5@ += 130
- 6@ += 80
- 0B6F: render font 9@ draw_text 21@ pos 5@ 6@ color 0xFF8FBC8F
- 0470: 1@ = actor $PLAYER_ACTOR current_weapon
- format $weaponidinarms "Weapon ID: %d" 1@
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- 5@ += 10
- 6@ += 95
- 0B6F: render font 9@ draw_text $weaponidinarms pos 5@ 6@ color 0xFF8FBC8F
- 0AB1: call @getAmmoInClip 0 return: $ammoinclip
- format $getAmmoInClip "Ammo In Clip: %d" $ammoinclip
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- 5@ += 130
- 6@ += 95
- 0B6F: render font 9@ draw_text $getAmmoInClip pos 5@ 6@ color 0xFF8FBC8F
- 0470: 1@ = actor $PLAYER_ACTOR current_weapon
- 0AB1: call @get_weapon_name_by_id 1 id 1@ to 1@
- format $nameofweapon "Weapon Name: %s" 1@
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- 5@ += 10
- 6@ += 110
- 0B6F: render font 9@ draw_text $nameofweapon pos 5@ 6@ color 0xFF8FBC8F
- call @FPS 7 in $showfps0 $showfps1 $showfps2 $showfps3 $showfps4 $showfps5 $showfps6 out $showfps0 $showfps1 $showfps2 $showfps3 $showfps4 $showfps5 $showfps6
- 0092: $showfps8 = float $showfps6 to_integer
- format $showfps228 "Fps: %d" $showfps8
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- 5@ += 200
- 6@ -= 10
- 0B6F: render font 9@ draw_text $showfps228 pos 5@ 6@ color 0xFF8FBC8F
- if Actor.Driving($PLAYER_ACTOR)
- then
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
- 0B73: render draw_texture 0@ pos 5@ 6@ size 285 75 rotation 0.0 color -1
- $thiscar = Actor.CurrentCar($PLAYER_ACTOR)
- $idcar = SAMP.GetSAMPVehicleIDByCarHandle($thiscar)
- format 22@ "Vehicle ID: %d" $idcar
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
- 5@ += 10
- 6@ += 5
- 0B6F: render font 9@ draw_text 22@ pos 5@ 6@ color 0xFF8FBC8F
- 02E3: 1@ = car $thiscar speed
- 0092: 3@ = float 1@ to_integer
- 3@ *= 2.1
- format 23@ "Speed: %d" 3@
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
- 5@ += 130
- 6@ += 5
- 0B6F: render font 9@ draw_text 23@ pos 5@ 6@ color 0xFF8FBC8F
- 03F3: get_car $thiscar primary_color_to 1@ secondary_color_to 7@
- format 24@ "Color car 1: %d" 1@
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
- 5@ += 10
- 6@ += 20
- 0B6F: render font 9@ draw_text 24@ pos 5@ 6@ color 0xFF8FBC8F
- 1@ = Actor.CurrentCar($PLAYER_ACTOR)
- 03F3: get_car $thiscar primary_color_to 7@ secondary_color_to 1@
- format 25@ "Color car 2: %d" 1@
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
- 5@ += 130
- 6@ += 20
- 0B6F: render font 9@ draw_text 25@ pos 5@ 6@ color 0xFF8FBC8F
- $modelcar = Car.Model($thiscar)
- 0ADB: $namecar = car_model $modelcar name
- format 26@ "Car Name: %s" $namecar
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
- 5@ += 130
- 6@ += 35
- 0B6F: render font 9@ draw_text 26@ pos 5@ 6@ color 0xFF8FBC8F
- 09B3: get_car $thiscar door_status $104
- if $104 == 0
- then
- format $doorcar "Door: Open"
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
- 5@ += 10
- 6@ += 35
- 0B6F: render font 9@ draw_text $doorcar pos 5@ 6@ color 0xFF8FBC8F
- else
- format $doorcar "Door: Close"
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
- 5@ += 10
- 6@ += 35
- 0B6F: render font 9@ draw_text $doorcar pos 5@ 6@ color 0xFF8FBC8F
- end
- if
- 0ABE: vehicle $thiscar engine_on
- then
- format 27@ "Engine: ON"
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
- 5@ += 10
- 6@ += 50
- 0B6F: render font 9@ draw_text 27@ pos 5@ 6@ color 0xFF8FBC8F
- else
- format 27@ "Engine: OFF"
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
- 5@ += 10
- 6@ += 50
- 0B6F: render font 9@ draw_text 27@ pos 5@ 6@ color 0xFF8FBC8F
- end
- $thiscar = Car.Health($thiscar)
- format 28@ "HP(car): %d" $thiscar
- 0AF0: 5@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
- 0AF0: 6@ = get_int_from_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
- 5@ += 130
- 6@ += 50
- 0B6F: render font 9@ draw_text 28@ pos 5@ 6@ color 0xFF8FBC8F
- end
- end
- if
- $moveinfobar == 1
- then
- SAMP.SetCursorMode(2)
- 0B5E: get_cursor_pos $moveinfobarX $moveinfobarY
- 0AF1: write_int $moveinfobarX to_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosX"
- 0AF1: write_int $moveinfobarY to_ini_file "cleo\INI\infobar.ini" section "Onfoot" key "PosY"
- end
- if
- $movecarinfobar == 1
- then
- SAMP.SetCursorMode(2)
- 0B5E: get_cursor_pos $movecarinfobarX $movecarinfobarY
- 0AF1: write_int $movecarinfobarX to_ini_file "cleo\INI\infobar.ini" section "incar" key "PosX"
- 0AF1: write_int $movecarinfobarY to_ini_file "cleo\INI\infobar.ini" section "incar" key "PosY"
- end
- 0AF0: $ClearScreen = get_int_from_ini_file "cleo\INI\infobar.ini" section "ClearScreen" key "ClearScreen"
- if and
- $ClearScreen == 1
- 2@ == 1
- key_down 119
- then
- 2@ = 0
- wait 500
- 2@ = 1
- end
- end
- :sb2
- if
- 2@ == 1
- then
- 2@ = 0
- free 10@
- free 11@
- free 12@
- free 13@
- free 14@
- free 15@
- free 16@
- free 17@
- free 18@
- free 19@
- free 20@
- free 21@
- free 22@
- free 23@
- free 24@
- free 25@
- free $namecar
- free 26@
- free $doorcar
- free 27@
- free 28@
- free $weaponidinarms
- free $nameofweapon
- free $wantedlvl
- free $Timeonyourpc
- free $interioractive
- free $getAmmoInClip
- free $showfps228
- else
- 2@ = 1
- alloc 10@ 128
- alloc 11@ 128
- alloc 12@ 128
- alloc 13@ 128
- alloc 14@ 128
- alloc 15@ 128
- alloc 16@ 128
- alloc 17@ 128
- alloc 18@ 128
- alloc 19@ 128
- alloc 20@ 128
- alloc 21@ 128
- alloc 22@ 128
- alloc 23@ 128
- alloc 24@ 128
- alloc 25@ 128
- alloc $namecar 128
- alloc 26@ 128
- alloc $doorcar 128
- alloc 27@ 128
- alloc 28@ 128
- alloc $weaponidinarms 128
- alloc $nameofweapon 128
- alloc $wantedlvl 128
- alloc $Timeonyourpc 128
- alloc $interioractive 128
- alloc $getAmmoInClip 128
- alloc $showfps228 128
- end
- SAMP.CmdRet()
- :sb3
- if $moveinfobar == 1
- then
- $moveinfobar = 0
- 0AF8: samp add_message_to_chat "Ïåğìåùåíèå âûêë." color -1
- else
- $moveinfobar = 1
- 0AF8: samp add_message_to_chat "Ïåğìåùåíèå âêë." color -1
- end
- SAMP.CmdRet()
- :sb4
- if $movecarinfobar == 1
- then
- $movecarinfobar = 0
- 0AF8: samp add_message_to_chat "Ïåğìåùåíèå âûêë." color -1
- else
- if Actor.Driving($PLAYER_ACTOR)
- then
- $movecarinfobar = 1
- 0AF8: samp add_message_to_chat "Ïåğìåùåíèå âêë." color -1
- else 0AF8: samp add_message_to_chat "Íåîáõîäèìî áûòü â ìàøèíå" color -1
- end
- end
- SAMP.CmdRet()
- :FPS
- // in: 0@ - frameCounter, 1@, 2@, 3@, 4@ - fpsBuf, 5@ - fpsTime, 6@ - fpsDisplay. out: 0@ - frameCounter, 1@, 2@, 3@, 4@ - fpsBuf, 5@ - fpsTime, 6@ - fpsDisplay
- $showfps0 += 1.0 // fpsFrameCounter++;
- 0A8D: $showfps7 = read_memory TIMER_OFFSET size 4 virtual_protect 0 // GetTickCount
- 0085: $showfps8 = $showfps7 // (int)
- 0062: $showfps7 -= $showfps5 // (int)
- if $showfps7 > 240 // if ( (GetTickCount() - 240) > fps_time )
- then
- 0087: $showfps4 = $showfps3 // fpsBuf4 = fpsBuf3;
- 0087: $showfps3 = $showfps2 // fpsBuf3 = fpsBuf2;
- 0087: $showfps2 = $showfps1 // fpsBuf2 = fpsBuf1;
- // fpsBuf1 = ( fpsFrameCounter * 4 );
- 0087: $showfps1 = $showfps0
- $showfps1 *= 4.0
- // fpsDisplay = ( fpsBuf1 + fpsBuf2 + fpsBuf3 + fpsBuf4 ) / 4.0;
- 0087: $showfps6 = $showfps1
- 005B: $showfps6 += $showfps2 // (float)
- 005B: $showfps6 += $showfps3 // (float)
- 005B: $showfps6 += $showfps4 // (float)
- $showfps6 /= 4.0
- // fpsFrameCounter = 0;
- $showfps0 = 0.0
- // fps_time = GetTickCount();
- 0085: $showfps5 = $showfps8
- end
- ret 7 $showfps0 $showfps1 $showfps2 $showfps3 $showfps4 $showfps5 $showfps6
- :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
- "Duke" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 { 0 }
- "Brass Knuckles" 00 00 00 00 00 { 1 }
- "Golf Club" 00 00 00 00 00 00 00 00 00 00 { 2 }
- "Nite 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 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 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 }
- "Deagle" 00 00 00 00 00 00 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 }
- "AK47" 00 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 Launcher" 00 00 00 00 { 35 }
- "HS Rocket 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 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 Vision" 00 00 00 00 { 45 }
- "Parachute" 00 00 00 00 00 00 00 00 00 00 { 46 }
- end
- :getAmmoInClip
- 0A96: 0@ = actor $PLAYER_ACTOR struct
- 0A8E: 1@ = 0@ + 0x0718
- 0A8D: 1@ = read_memory 1@ size 1 virtual_protect 0
- 1@ *= 0x1C
- 0A8E: 2@ = 0@ + 0x5A0
- 005a: 2@ += 1@
- 2@ += 0x8
- 0A8D: 2@ = read_memory 2@ size 4 virtual_protect 0
- ret 1 2@
- :getWantedLevel
- 0A8D: $lvlwanted = read_memory 0x58DB60 size 1 virtual_protect 0
- 0AB2: ret 1 $lvlwanted
- :GetLocalTime
- /*
- Params:
- In: None
- Out: wYear 4@ wMonth 5@ wDayOfWeek 6@ wDay 7@ wHour 8@ wMinute 9@ wSeconds 10@ wMiliseconds 11@
- Example:
- 0AB1: Call @GetLocalTime 0 wYear 4@ wMonth 5@ wDayOfWeek 6@ wDay 7@ wHour 8@ wMinute 9@ wSeconds 10@ wMiliseconds 11@
- */
- 0AA2: $SystemTime0 = load_library "kernel32.dll"
- 0AA4: $SystemTime1 = get_proc_address "GetLocalTime" library $SystemTime0
- 0AC8: $SystemTime2 = alloc mem 16
- 0AA5: call $SystemTime1 params 1 pop 0 $SystemTime2
- 0085: $SystemTime3 = $SystemTime2
- 0A8D: $SystemTime4 = read mem $SystemTime3 size 2 vp 0 // wYear
- $SystemTime3 += 2
- 0A8D: $SystemTime5 = read mem $SystemTime3 size 2 vp 0 // wMonth
- $SystemTime3 += 2
- 0A8D: $SystemTime6 = read mem $SystemTime3 size 2 vp 0 // wDayOfWeek
- $SystemTime3 += 2
- 0A8D: $SystemTime7 = read mem $SystemTime3 size 2 vp 0 // wDay
- $SystemTime3 += 2
- 0A8D: $SystemTime8 = read mem $SystemTime3 size 2 vp 0 // wHour
- $SystemTime3 += 2
- 0A8D: $SystemTime9 = read mem $SystemTime3 size 2 vp 0 // wMinute
- $SystemTime3 += 2
- 0A8D: $SystemTime10 = read mem $SystemTime3 size 2 vp 0 // wSecond
- $SystemTime3 += 2
- 0A8D: $SystemTime11 = read mem $SystemTime3 size 2 vp 0 // wMilliseconds
- 0AC9: free_allocated_memory $SystemTime2
- ret 8 $SystemTime4 $SystemTime5 $SystemTime6 $SystemTime7 $SystemTime8 $SystemTime9 $SystemTime10 $SystemTime11
- :download_check_status
- 1@ = -1
- while 1@ == -1
- wait 0
- 0C66: 1@ = get_download 0@ state
- end
- 0AB2: ret 1 1@
- :url_fileupdateinfo
- hex
- "http:" "/" "/" "chekobnova.hol.es/infobar.txt" 00
- end
- :check_updates
- 0AC6: 1@ = label @url_fileupdateinfo offset
- 0C65: 1@ = download_url 1@ to_file UPDATEINFO_FILE
- 0AB1: call_scm_func @download_check_status 1 download_n 1@ status_to 2@
- 0C7D: release_download 1@
- if 2@ <> 0
- then
- 0AF8: samp add_message_to_chat "Ïğîèçîøëà îøèáêà âî âğåìÿ çàãğóçêè. Îøèáêà %p" color -1 2@
- else // èíà÷å
- 0AF8: samp add_message_to_chat "Çàãğóçêà óñïåøíî çàâåğøåíà." color -1
- if 0AAB: file_exists UPDATEINFO_FILE
- then
- 0AF0: 3@ = get_int_from_ini_file UPDATEINFO_FILE section "UPDATE" key "version"
- if 001D: 3@ > 0@
- then
- 0AF8: samp add_message_to_chat "Äîñòóïíà íîâàÿ âåğñèÿ îáíîâëåíèÿ ¹%d äëÿ {FFFF00}infobar" color -1 3@
- 0AC8: 4@ = allocate_memory_size 260
- 0C11: memset destination 4@ value 0 size 260
- 0AF4: 4@ = read_string_from_ini_file UPDATEINFO_FILE section "UPDATE" key "changelog_url"
- 0C65: 1@ = download_url 4@ to_file CHANGELOG_FILE
- 0AB1: call_scm_func @download_check_status 1 download_n 1@ status_to 2@
- 0C7D: release_download 1@
- if 2@ == 0
- then
- 0AB1: call_scm_func @show_changelog 0
- end
- // -------
- 0C11: memset destination 4@ value 0 size 260
- 0AF4: 4@ = read_string_from_ini_file UPDATEINFO_FILE section "UPDATE" key "script_url"
- 0C65: 1@ = download_url 4@ to_file "cleo/infobar.cs"
- 0AB1: call_scm_func @download_check_status 1 download_n 1@ status_to 2@
- 0C7D: release_download 1@
- if 2@ == 0
- then
- 0AF8: samp add_message_to_chat "Îáíîâëåíèå çàâåğøåíî." color -1
- 0AF8: samp add_message_to_chat "Ïåğåçàïóñòèòå èãğó." color -1
- else
- 0AF8: samp add_message_to_chat "Ïğîèçîøëà îøèáêà ïğè îáíîâëåíèè." color -1
- end
- 0AC9: free_allocated_memory 4@
- end
- end
- end
- 0AB2: ret 0
- :show_changelog
- if 0A9A: 0@ = openfile CHANGELOG_FILE mode "rt"
- then
- 0AC8: 1@ = allocate_memory_size 96
- 0C11: memset destination 1@ value 0 size 96
- 0A9C: 2@ = file 0@ size
- 2@++
- 0AC8: 4@ = allocate_memory_size 2@
- 0C11: memset destination 4@ value 0 size 2@
- repeat
- 0AD7: read_string_from_file 0@ to 1@ size 95
- 0C17: 3@ = strlen 1@
- if 3@ > 0
- then
- 0C15: strcat destination 4@ source 1@
- end
- until 0AD6: end_of_file 0@ reached
- 0B3B: samp show_dialog id 335 caption "{FFFF00}Ñïèñîê èçìåíåíèé {FFFFFF}infobar" text 4@ button_1 "ÎÊ" button_2 "" style 0
- 0AC9: free_allocated_memory 4@
- 0AC9: free_allocated_memory 1@
- 0A9B: closefile 0@
- end
- 0AB2: ret 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement