да, краш потому что 21@ переменная в конце меньше 0 и ты поставил wait 21@
{$CLEO}
0000:
const
NUM_PARKING_SENSORS = 4
MAX_SENSOR_RANGE = 3.0
SOUND_RACE_321 = 1056
SOUND_RACE_GO = 1057
end
while true
0001: wait 0 ms
if
00DF: actor $PLAYER_ACTOR driving
then
03C0: 0@ = actor $PLAYER_ACTOR car
02E3: 1@ = car 0@ speed
if
0023: 15.0 > 1@
then
0441: 1@ = car 0@ model
if
0A01: model 1@ car
then
07E4: get_model 1@ dimensions_cornerA_to 2@ 3@ 4@ dimensions_cornerB_to 5@ 6@ 7@
000B: 2@ += 0.25
000F: 5@ -= 0.25
0087: 8@ = 5@
0087: 11@ = 2@
0063: 8@ -= 2@
0087: 9@ = 8@
0006: 10@ = NUM_PARKING_SENSORS
000E: 10@ -= 1
0093: 10@ = integer 10@ to_float
0073: 9@ /= 10@
0087: 13@ = 3@
000F: 13@ -= MAX_SENSOR_RANGE
0006: 14@ = false
0007: 21@ = -100.0
for 12@ = 1 to NUM_PARKING_SENSORS
0407: store_coords_to 15@ 16@ 17@ from_car 0@ with_offset 11@ 3@ -0.1
0407: store_coords_to 18@ 19@ 20@ from_car 0@ with_offset 11@ 13@ -0.1
if
86BD: not no_obstacles_between 15@ 16@ 17@ and 18@ 19@ 20@ solid 1 car 1 actor 1 object 1 particle 0
then
0006: 14@ = true
0087: 22@ = 13@
repeat
000B: 22@ += 0.1
if
0025: 22@ > 21@
then
0087: 21@ = 22@
end
0407: store_coords_to 15@ 16@ 17@ from_car 0@ with_offset 11@ 3@ -0.1
0407: store_coords_to 18@ 19@ 20@ from_car 0@ with_offset 11@ 22@ -0.1
until 06BD: no_obstacles_between 15@ 16@ 17@ and 18@ 19@ 20@ solid 1 car 1 actor 1 object 1 particle 0
end
005B: 11@ += 9@
end
if
0039: 14@ == true
then
0097: make 21@ absolute_float
006B: 21@ *= 21@
006B: 21@ *= 21@
0092: 21@ = float 21@ to_integer
if
002B: 75 >= 21@
then
097A: play_audio_at 0.0 0.0 0.0 event SOUND_RACE_GO
else
097A: play_audio_at 0.0 0.0 0.0 event SOUND_RACE_321
end
if 21@ > 1
then
0001: wait 21@ ms
else
chatmsg "пизда" 0xffffff
end
end
end
end
end
end
тут не крашит
ПОМОГИТЕ, делаю chud) и хочу сделать вывод текстурок оружие на экран, все текстуры есть, но как их загрузить?
пытался сделать массив с указателями на их структуры, но не выводятся
alloc 11@ 512
0B71: render 12@ = load_texture_from_file "cleo\hud\fist.png"
0C0F: array 11@ element 0 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\BRASSKNUCKLEicon.png"
0C0F: array 11@ element 1 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\golfclubicon.png"
0C0F: array 11@ element 2 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\nitestickicon.png"
0C0F: array 11@ element 3 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\knifecuricon.png"
0C0F: array 11@ element 4 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\baticon.png"
0C0F: array 11@ element 5 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\shovelicon.png"
0C0F: array 11@ element 6 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\poolcueicon.png"
0C0F: array 11@ element 7 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\katanaicon.png"
0C0F: array 11@ element 8 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\chnsawicon.png"
0C0F: array 11@ element 9 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\gun_dildo2icon.png"
0C0F: array 11@ element 10 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\flowerbicon.png"
0C0F: array 11@ element 11 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\gun_caneicon.png"
0C0F: array 11@ element 12 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\grenadeicon.png"
0C0F: array 11@ element 13 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\colt45icon.png"
0C0F: array 11@ element 14 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\silencedicon.png"
0C0F: array 11@ element 15 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\desert_eagleicon.png"
0C0F: array 11@ element 16 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\chromegunicon.png"
0C0F: array 11@ element 17 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\sawnofficon.png"
0C0F: array 11@ element 18 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\shotgspaicon.png"
0C0F: array 11@ element 19 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\micro_uziicon.png"
0C0F: array 11@ element 20 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\mp5lngicon.png"
0C0F: array 11@ element 21 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\ak47icon.png"
0C0F: array 11@ element 22 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\M4icon.png"
0C0F: array 11@ element 23 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\tec9icon.png"
0C0F: array 11@ element 24 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\cuntgunicon.png"
0C0F: array 11@ element 25 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\SNIPERicon.png"
0C0F: array 11@ element 26 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\rocketlaicon.png"
0C0F: array 11@ element 27 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\heatseekicon.png"
0C0F: array 11@ element 28 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\flameicon.png"
0C0F: array 11@ element 29 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\minigunicon.png"
0C0F: array 11@ element 30 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\satchelicon.png"
0C0F: array 11@ element 31 = 12@
0B72: render release_texture 12@
0B71: render 12@ = load_texture_from_file "cleo\hud\cellphoneicon.png"
0C0F: array 11@ element 32 = 12@
0B72: render release_texture 12@
выводил их так: фулл код не дам, тк скрипт приват)
0AB1: call_scm_func @getweapon 7 1@ 2@ 29@ 6@ 7@ 30@ 11@ result_to // 1@ 2@ - позиция 6@ 7@ тоже 30@ - шрифт 11@ - массив
:getweapon
0C0E: 7@ = array 6@ element 16
0B73: render draw_texture 7@ pos 0@ 1@ size 100 100 rotation 0.0 color 0xffffffff
ret 0