- 1,890
- 1,907
Я начинающий в клео, дали исходник и решил его сам с компилить и выдает Неизвестная ошибка then , и как решить то эту проблему, компилю в санике, хочу немного оптимизировать, убрать некоторые надписи и drawline
вот исходник
вот исходник
CLEO:
{$CLEO}
0000:
thread "astap"
0662: "Made by astap_"
0662: "BlastHack.Net"
if 8AAB: file_exists "CLEO\rwh.ini"
then
0AF1: write_int 1 to_ini_file "cleo\rwh.ini" section "Settings" key "RenderStone"
end
0AF0: 11@ = get_int_from_ini_file "cleo\rwh.ini" section "Settings" key "RenderStone"
while not SAMP.Available()
wait 0
end
27@ = Render.CreateFont("Arial", 9, 5)
0b34: cmd "rwh" to_label @rwh
//0B6C: render 15@ = 27@ draw_height
while 8B61: samp is_local_player_spawned
wait 0
end
CHATMSG "{ffcc00}[Resource Finder]{FFFFFF}: успешно загружен! {ffcc00}Используйте:{FFFFFF} /rwh." -1
CHATMSG "{ffcc00}[Resource Finder]{FFFFFF}: Разработчик: {ffcc00}astap{FFFFFF}." -1
while true
wait 0
if 31@ == true
then
for 0@ = 1000 to 1200
if 0B46: samp 3d_text 0@ defined
then
0C46: samp get_3d_text_info_by_id 0@ string_ptr 1@ color 0 position 28@ 29@ 30@ view_distance 0 show_behind_walls 0 attached_to_player 0 attached_to_vehicle 0
Actor.StorePos($PLAYER_ACTOR 22@ 23@ 24@)
0B55: convert_3D_coords 22@ 23@ 24@ to_screen 20@ 21@
//050A: 19@ = distance_between_XYZ 22@ 23@ 24@ and_XYZ 28@ 29@ 30@
//0092: 19@ = float 19@ to_integer
alloc 2@ 256
format 2@ = "%s" 1@
if 00C2: sphere_onscreen 28@ 29@ 30@ radius 0.0
then
if 0C18: 3@ = strstr string1 2@ string2 "золота"
then
0B55: convert_3D_coords 28@ 29@ 30@ to_screen 25@ 26@
Render.DrawLine(20@, 21@, 25@, 26@, 1, 0xFFffcc00)
Render.DrawText(27@ , "[GOLD]" 25@ 26@ 0xFFffcc00)
//free 2@
end
if 0C18: 3@ = strstr string1 2@ string2 "металла"
then
0B55: convert_3D_coords 28@ 29@ 30@ to_screen 25@ 26@
Render.DrawLine(20@, 21@, 25@, 26@, 1, 0xFF86877F)
Render.DrawText(27@ , "[METAL]" 25@ 26@ 0xFF86877F)
//free 2@
end
if 0C18: 3@ = strstr string1 2@ string2 "бронзы"
then
0B55: convert_3D_coords 28@ 29@ 30@ to_screen 25@ 26@
Render.DrawLine(20@, 21@, 25@, 26@, 1, 0xFFa54e22)
Render.DrawText(27@ , "[BRONZE]" 25@ 26@ 0xFFa54e22)
//free 2@
end
if 0C18: 3@ = strstr string1 2@ string2 "серебра"
then
0B55: convert_3D_coords 28@ 29@ 30@ to_screen 25@ 26@
Render.DrawLine(20@, 21@, 25@, 26@, 1, 0xFF42f4df)
Render.DrawText(27@ , "[SILVER]" 25@ 26@ 0xFF42f4df)
//free 2@
end
if and
0C18: 3@ = strstr string1 2@ string2 "камня"
11@ == 1
then
0B55: convert_3D_coords 28@ 29@ 30@ to_screen 25@ 26@
Render.DrawLine(20@, 21@, 25@, 26@, 1, 0xFFFFFFFF)
Render.DrawText(27@ , "[STONE]" 25@ 26@ 0xFFFFFFFF)
end
free 2@
else
free 2@
end
end
end
end
end
:teleport
4@ = 0
while true
wait 0
for 0@ = 1000 to 1200
if 0B46: samp 3d_text 0@ defined
then
0C46: samp get_3d_text_info_by_id 0@ string_ptr 1@ color 0 position 28@ 29@ 30@ view_distance 0 show_behind_walls 0 attached_to_player 0 attached_to_vehicle 0
alloc 2@ 256
format 2@ = "%s" 1@
if 0C18: 3@ = strstr string1 2@ string2 "золота"
then
free 2@
chatmsg "• Вижу {ffcc00}золото{FFFFFF}! Нажмите {ffcc00}F9{FFFFFF} для телепортации." -1
018C: SOUND 1139 0.0 0.0 0.0
while true
wait 1
4@ += 1
if 4@ == 1000
then
goto @teleport
end
if 0c89: 120
then
break // teleport confirmed!
end
end
if Actor.Driving($PLAYER_ACTOR)
then
0792: disembark_instantly_actor $PLAYER_ACTOR
end
Actor.StorePos($PLAYER_ACTOR , 5@ 6@ 7@)
while 8031: 7@ >= -100.0
wait 0
7@ -= 0.94
call @SendOnfootSyncFalling 3 5@ 6@ 7@
end
call @SendOnfootSync 3 5@ 6@ -101.0
Actor.PutAt($PLAYER_ACTOR 28@ 29@ 30@)
print "~y~teleported!" 1500
4@ = 0
wait 15000
else
free 2@
end
end
end
end
:SendOnfootSyncFalling
3@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
0BBA: samp store_player 3@ onfoot_data 4@
alloc 4@ 68
0C0D: struct 4@ offset 10 size 4 = 1@
0C0D: struct 4@ offset 10 size 4 = 2@
0C0D: struct 4@ offset 14 size 4 = 3@
0C0D: struct 4@ offset 38 size 4 = 0.0
0C0D: struct 4@ offset 42 size 4 = 0.0
0C0D: struct 4@ offset 46 size 4 = -0.939
0BC0: samp send_onfoot_data 4@
free 4@
ret 0
:SendOnfootSync
3@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
0BBA: samp store_player 3@ onfoot_data 4@
alloc 4@ 68
0C0D: struct 4@ offset 6 size 4 = 0@
0C0D: struct 4@ offset 10 size 4 = 1@
0C0D: struct 4@ offset 14 size 4 = 2@
0BC0: samp send_onfoot_data 4@
free 4@
ret 0
:rwh
0B12: 31@ = 31@ XOR 1
if 31@ == true
then
print "resourse finder ~y~acivated!" 2000
018C: SOUND 1083 0.0 0.0 0.0
0C6A: 15@ = create_custom_thread_at_label @teleport
end
if 31@ == false
then
print "resourse finder ~r~deacivated!" 2000
018C: SOUND 1085 0.0 0.0 0.0
0C6E: destroy_custom_thread 15@
end
CMDRET