pepeelpubero
Well-known member
- Joined
- Jan 21, 2014
- Messages
- 433
- Reaction score
- 1
I wanna put the car name which i am driving near the radar, i have something (position and code) but when i try it doesn't work, my game crashes, can anyone help me please? or make it a cleo?
Decompiled :
Vehicles name :
Code:
{$CLEO}
{
Mod Name: Town\Zone texts
Author: Wesser
Credits: Nope
}
const
PX = 1@
PY = 2@
PZ = 3@
CURRENT_TOWN = 7@
WIDESCREEN_STATUS = 8@
IS_IN_WIDESCREEN = 9@
ENTER_STATUS = 10@
IS_OPENING_DOOR = 11@
IS_IN_CUTSCENE = 12@
RADAR_MODE = 13@
RADAR_ENABLED = 14@
IS_RADAR_ONSCREEN = 15@
INTO_INTERIOR = 16@
IS_IN_INTERIOR = 17@
PL_VEHICLE = 18@
///--------------------------
STRING = $5
STRING2 = $30
///--------------------------
VEHICLE_TEXT = 0@s
///--------------------------
ZONE_TEXT = s$93
TOWN_TEXT = s$95
INTERIOR_TEXT = v$99
end
IS_IN_WIDESCREEN = FALSE
IS_OPENING_DOOR = FALSE
IS_IN_CUTSCENE = FALSE
IS_RADAR_ONSCREEN = TRUE
IS_IN_INTERIOR = FALSE
0000: Starting code...
gosub @RemoveOnScreenTexts
while true
wait 0
gosub @WideScreenCheck
gosub @OpenDoorCheck
gosub @CutsceneCheck
gosub @GetRadarOnScreen
if or
IS_IN_WIDESCREEN == TRUE
IS_OPENING_DOOR == TRUE
IS_IN_CUTSCENE == TRUE
IS_RADAR_ONSCREEN == FALSE
then
03F0: enable_text_draw 0
else
if and
80DF: not actor $PLAYER_ACTOR driving
00E1: player $PLAYER_CHAR pressed_key 4
then
03F0: enable_text_draw 0
else
03F0: enable_text_draw 1
gosub @ZoneTextDisplay
gosub @VehicleTextDisplay
end
end
end
:WideScreenCheck
0A8D: WIDESCREEN_STATUS = read_memory 0xB6F065 size 4 virtual_protect 0
if
WIDESCREEN_STATUS == 1
then
IS_IN_WIDESCREEN = TRUE
else
IS_IN_WIDESCREEN = FALSE
end
return
:OpenDoorCheck
0A8D: ENTER_STATUS = read_memory 0x96A7CC size 4 virtual_protect 0 // I found this :)
if or
ENTER_STATUS == 1
ENTER_STATUS == 2
then
IS_OPENING_DOOR = TRUE
else
IS_OPENING_DOOR = FALSE
end
return
:CutsceneCheck
if
06B9: cutscene_data_loaded
then
if
82E9: not cutscene_reached_end
then
IS_IN_CUTSCENE = TRUE
end
else
IS_IN_CUTSCENE = FALSE
end
return
:GetRadarOnScreen
0A8D: RADAR_MODE = read_memory 0xBA676C size 4 virtual_protect 0
0A8D: RADAR_ENABLED = read_memory 0xBAA3FB size 4 virtual_protect 0
if and
RADAR_MODE == 2
RADAR_ENABLED == 0
then
IS_RADAR_ONSCREEN = FALSE
else
IS_RADAR_ONSCREEN = TRUE
end
return
:ZoneTextDisplay
gosub @InteriorCheck
if
IS_IN_INTERIOR == FALSE
then
gosub @GetZoneText
gosub @TownTextDisplay
if or
05AD: ZONE_TEXT == 'LA' // Los Santos
05AD: ZONE_TEXT == 'SF' // San Fierro
05AD: ZONE_TEXT == 'VE' // Las Venturas
then
05A9: ZONE_TEXT = 'CT' // Country
end
if
05AD: ZONE_TEXT == 'SAN_AND' // San Andreas
then
05A9: ZONE_TEXT = 'CN' // Ocean
end
gosub @DrawZoneText
else
gosub @InteriorTextDisplay
end
return
:InteriorCheck
077E: get_active_interior_to INTO_INTERIOR
if
INTO_INTERIOR == 0
then
IS_IN_INTERIOR = FALSE
else
IS_IN_INTERIOR = TRUE
end
return
:GetZoneText
00A0: store_actor $PLAYER_ACTOR position_to PX PY PZ
0843: get_zone_at PX PY PZ nameA_to ZONE_TEXT // 8-byte string
return
:TownTextDisplay
gosub @GetCurrentTown
if
CURRENT_TOWN == 0
then
05A9: TOWN_TEXT = 'CS' // Country Side
end
if
CURRENT_TOWN == 1
then
05A9: TOWN_TEXT = 'LA' // Los Santos
end
if
CURRENT_TOWN == 2
then
05A9: TOWN_TEXT = 'SF' // San Fierro
end
if
CURRENT_TOWN == 3
then
05A9: TOWN_TEXT = 'VE' // Las Venturas
end
if
05AD: ZONE_TEXT == 'SAN_AND' // San Andreas
then
05A9: TOWN_TEXT = 'SAN_AND' // San Andreas
end
if
05AD: ZONE_TEXT == 'LA' // Los Santos
then
05A9: TOWN_TEXT = 'LA' // Los Santos
end
if
05AD: ZONE_TEXT == 'SF' // San Fierro
then
05A9: TOWN_TEXT = 'SF' // San Fierro
end
if
05AD: ZONE_TEXT == 'VE' // Las Venturas
then
05A9: TOWN_TEXT = 'VE' // Las Venturas
end
gosub @DrawTownText
return
:DrawZoneText
03E0: unknown_text_draw_flag 1
033F: set_text_draw_letter_size 0.3 1.2
0342: enable_text_draw_centered 1
081C: draw_text_outline 2 RGBA 0 0 0 255
033E: set_draw_text_position 100.0 426.0 GXT ZONE_TEXT
return
:GetCurrentTown
0842: CURRENT_TOWN = player $PLAYER_CHAR town_number
return
:DrawTownText
03E0: unknown_text_draw_flag 1
033F: set_text_draw_letter_size 0.3 1.2
0342: enable_text_draw_centered 1
081C: draw_text_outline 2 RGBA 0 0 0 255
033E: set_draw_text_position 100.0 308.0 GXT TOWN_TEXT
return
:InteriorTextDisplay
gosub @GetInteriorText
gosub @DrawInteriorText // DrawZoneText as DrawInteriorText
gosub @DrawTownText
return
:GetInteriorText
094B: INTERIOR_TEXT = get_active_interior_name_from_actor $PLAYER_ACTOR // 16-byte string
return
:DrawInteriorText
03E0: unknown_text_draw_flag 1
033F: set_text_draw_letter_size 0.3 1.2
0342: enable_text_draw_centered 1
081C: draw_text_outline 2 RGBA 0 0 0 255
033E: set_draw_text_position 100.0 426.0 GXT INTERIOR_TEXT
return
:VehicleTextDisplay
if
00DF: actor $PLAYER_ACTOR driving
then
03C0: PL_VEHICLE = actor $PLAYER_ACTOR car
0441: 0@ = car PL_VEHICLE model
000E: 0@ -= 400
0012: 0@ *= 0x308
000A: 0@ += 0xB1F650
000A: 0@ += 0x36
0A8D: STRING = read_memory 0@ size 4 virtual_protect 0
000A: 0@ += 0x4
0A8D: STRING2 = read_memory 0@ size 3 virtual_protect 0
0AB1: call_scm_func @SubString 2 STRING STRING2
end
return
:SubString
gosub @DrawVehicleText
0AB2: ret 0
:DrawVehicleText
03E0: unknown_text_draw_flag 1
033F: set_text_draw_letter_size 0.3 1.2
0342: enable_text_draw_centered 1
081C: draw_text_outline 2 RGBA 0 0 0 255
033E: set_draw_text_position 100.0 295.0 GXT VEHICLE_TEXT
return
:RemoveOnScreenTexts
09BA: show_entered_zone_name 1
0826: enable_hud 0
09B9: show_entered_car_name 0
return
Code:
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}
//-------------MAIN---------------
9@ = 0
11@ = 0
12@ = 0
15@ = 1
17@ = 0
0000: NOP
gosub @NONAME_1340
:NONAME_44
wait 0
gosub @NONAME_185
gosub @NONAME_240
gosub @NONAME_302
gosub @NONAME_351
if or
9@ == 1
11@ == 1
12@ == 1
15@ == 0
else_jump @NONAME_126
03F0: enable_text_draw 0
jump @NONAME_178
:NONAME_126
if and
not Actor.Driving($PLAYER_ACTOR)
00E1: player $PLAYER_CHAR pressed_key 4
else_jump @NONAME_160
03F0: enable_text_draw 0
jump @NONAME_178
:NONAME_160
03F0: enable_text_draw 1
gosub @NONAME_427
gosub @NONAME_1164
:NONAME_178
jump @NONAME_44
:NONAME_185
0A8D: 8@ = read_memory 11989093 size 4 virtual_protect 0
if
8@ == 1
else_jump @NONAME_231
9@ = 1
jump @NONAME_238
:NONAME_231
9@ = 0
:NONAME_238
return
:NONAME_240
0A8D: 10@ = read_memory 9873356 size 4 virtual_protect 0
if or
10@ == 1
10@ == 2
else_jump @NONAME_293
11@ = 1
jump @NONAME_300
:NONAME_293
11@ = 0
:NONAME_300
return
:NONAME_302
if
06B9: cutscene_data_loaded
else_jump @NONAME_342
if
82E9: not cutscene_reached_end
else_jump @NONAME_335
12@ = 1
:NONAME_335
jump @NONAME_349
:NONAME_342
12@ = 0
:NONAME_349
return
:NONAME_351
0A8D: 13@ = read_memory 12216172 size 4 virtual_protect 0
0A8D: 14@ = read_memory 12231675 size 4 virtual_protect 0
if and
13@ == 2
14@ == 0
else_jump @NONAME_418
15@ = 0
jump @NONAME_425
:NONAME_418
15@ = 1
:NONAME_425
return
:NONAME_427
gosub @NONAME_595
if
17@ == 0
else_jump @NONAME_586
gosub @NONAME_641
gosub @NONAME_671
if or
05AD: s$93 == 'LA' // s$ == short // Los Santos
05AD: s$93 == 'SF' // s$ == short // San Fierro
05AD: s$93 == 'VE' // s$ == short // Las Venturas
else_jump @NONAME_533
05A9: s$93 = 'CT' // s$
:NONAME_533
if
05AD: s$93 == 'SAN_AND' // s$ == short // San Andreas
else_jump @NONAME_572
05A9: s$93 = 'CN' // s$
:NONAME_572
gosub @NONAME_971
jump @NONAME_593
:NONAME_586
gosub @NONAME_1081
:NONAME_593
return
:NONAME_595
077E: get_active_interior_to 16@
if
16@ == 0
else_jump @NONAME_632
17@ = 0
jump @NONAME_639
:NONAME_632
17@ = 1
:NONAME_639
return
:NONAME_641
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
0843: get_zone_at 1@ 2@ 3@ nameA_to s$93 // 8-byte string
return
:NONAME_671
gosub @NONAME_1021
if
7@ == 0
else_jump @NONAME_710
05A9: s$95 = 'CS' // s$
:NONAME_710
if
7@ == 1
else_jump @NONAME_742
05A9: s$95 = 'LA' // s$ // Los Santos
:NONAME_742
if
7@ == 2
else_jump @NONAME_774
05A9: s$95 = 'SF' // s$ // San Fierro
:NONAME_774
if
7@ == 3
else_jump @NONAME_806
05A9: s$95 = 'VE' // s$ // Las Venturas
:NONAME_806
if
05AD: s$93 == 'SAN_AND' // s$ == short // San Andreas
else_jump @NONAME_845
05A9: s$95 = 'SAN_AND' // s$ // San Andreas
:NONAME_845
if
05AD: s$93 == 'LA' // s$ == short // Los Santos
else_jump @NONAME_884
05A9: s$95 = 'LA' // s$ // Los Santos
:NONAME_884
if
05AD: s$93 == 'SF' // s$ == short // San Fierro
else_jump @NONAME_923
05A9: s$95 = 'SF' // s$ // San Fierro
:NONAME_923
if
05AD: s$93 == 'VE' // s$ == short // Las Venturas
else_jump @NONAME_962
05A9: s$95 = 'VE' // s$ // Las Venturas
:NONAME_962
gosub @NONAME_1031
return
:NONAME_971
03E0: draw_text_behind_textures 1
033F: set_text_draw_letter_size 0.3 1.2
0342: set_text_draw_centered 1
081C: draw_text_outline 2 RGBA 0 0 0 255
033E: set_draw_text_position 100.0 426.0 GXT s$93
return
:NONAME_1021
0842: 7@ = player $PLAYER_CHAR town_number
return
:NONAME_1031
03E0: draw_text_behind_textures 1
033F: set_text_draw_letter_size 0.3 1.2
0342: set_text_draw_centered 1
081C: draw_text_outline 2 RGBA 0 0 0 255
033E: set_draw_text_position 100.0 308.0 GXT s$95
return
:NONAME_1081
gosub @NONAME_1104
gosub @NONAME_1114
gosub @NONAME_1031
return
:NONAME_1104
094B: v$99 = get_active_interior_name_from_actor $PLAYER_ACTOR // 16-byte string
return
:NONAME_1114
03E0: draw_text_behind_textures 1
033F: set_text_draw_letter_size 0.3 1.2
0342: set_text_draw_centered 1
081C: draw_text_outline 2 RGBA 0 0 0 255
033E: set_draw_text_position 100.0 426.0 GXT v$99
return
:NONAME_1164
if
Actor.Driving($PLAYER_ACTOR)
else_jump @NONAME_1276
18@ = Actor.CurrentCar($PLAYER_ACTOR)
0@ = Car.Model(18@)
0@ -= 400
0@ *= 776
0@ += 11662928
0@ += 54
0A8D: $5 = read_memory 0@ size 4 virtual_protect 0
0@ += 4
0A8D: $30 = read_memory 0@ size 3 virtual_protect 0
0AB1: call_scm_func @NONAME_1278 2 $5 $30
:NONAME_1276
return
:NONAME_1278
gosub @NONAME_1290
0AB2: ret 0
:NONAME_1290
03E0: draw_text_behind_textures 1
033F: set_text_draw_letter_size 0.3 1.2
0342: set_text_draw_centered 1
081C: draw_text_outline 2 RGBA 0 0 0 255
033E: set_draw_text_position 100.0 295.0 GXT 0@s
return
:NONAME_1340
09BA: show_entered_zone_name 1
0826: enable_hud 0
09B9: show_entered_car_name 0
return
Vehicles name :
Code:
:NONAME_1164
if
Actor.Driving($PLAYER_ACTOR)
else_jump @NONAME_1276
18@ = Actor.CurrentCar($PLAYER_ACTOR)
0@ = Car.Model(18@)
0@ -= 400
0@ *= 776
0@ += 11662928
0@ += 54
0A8D: $5 = read_memory 0@ size 4 virtual_protect 0
0@ += 4
0A8D: $30 = read_memory 0@ size 3 virtual_protect 0
0AB1: call_scm_func @NONAME_1278 2 $5 $30
:NONAME_1276
return
:NONAME_1278
gosub @NONAME_1290
0AB2: ret 0
:NONAME_1290
03E0: draw_text_behind_textures 1
033F: set_text_draw_letter_size 0.3 1.2
0342: set_text_draw_centered 1
081C: draw_text_outline 2 RGBA 0 0 0 255
033E: set_draw_text_position 100.0 295.0 GXT 0@s
return