Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Cayo Perico Heist
      2. The Diamond Casino Heist
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Frontier Pursuits
      2. Find Lobbies & Outlaws
      3. Help & Support
    3. Crews

    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA VI

      1. St. Andrews Cathedral
    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    6. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    7. GTA III

      1. Guides & Strategies
      2. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    3. Gangs

    1. Announcements

    2. Support

    3. Suggestions

AHNHYOEUN

[Not resolved yet!] Need a help! CLEO Coding

Recommended Posts

AHNHYOEUN
Posted (edited)

 

Hello, I am coding for CamHeli.cs.

 

1.

I solved all the other parts and only ran into issues below. It is normal for the function to turn off automatically when you get off the car.
But not "if or, if and". (It doesn't automatically turn off when you get in the car.)

Some people recommend using LOOP. But I'm not sure...not.DrivingVehicleType is 1 line, it acts as "if or".

 

However, if there are more than two lines, "if or, if and" will compile but will not work in in-game. I'm wondering how to fix it.

 

Please see below for details.

:NONAME_702
0683: attach_car 15@ to_car 14@ with_offset 0.0 3.0 -1.5 rotation 0.0 0.0 0.0 
0683: attach_car 16@ to_car 14@ with_offset 0.0 3.0 -1.5 rotation 0.0 0.0 0.0 
if or // if or = the function works but does not turn off again (it goes off when you get out of the car).
      // if and = function works, but it turns off again.
0AB0:   key_pressed 101 // turn off, numpad 5
   not Actor.DrivingVehicleType($PLAYER_ACTOR, #POLMAV)
   not Actor.DrivingVehicleType($PLAYER_ACTOR, #VCNMAV)
jf @NONAME_848 
0931: lock_camera_zoom 0 
092F: lock_camera_target_point 0 
Camera.Restore
08B2: enable_thermal_vision 0 
08B1: enable_night_vision 0 
25@ = 0 
17@ = 1 
Car.Destroy(15@)
Car.Destroy(16@)
wait 500 

 

 

 

 

2.

In addition, the scripter's principle is that the RCCam will be spawned under the vehicle, and the viewpoint will move to the camera. (Same principle as CamHack)

And you can freely change your point of view like a real helicopter camera. However, the mouse pointer sometimes moves strangely.
I want to fix this bug.

 

Below is the original scripter for CamHeli.cs.

// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
0000: NOP 
17@ = 1 
21@ = 0 
25@ = 0 

:NONAME_23
wait 0 
if 
   Actor.DrivingVehicleType($PLAYER_ACTOR, #POLMAV)
jf @NONAME_82 
1@ = Audiostream.Load("CLEO\SOUND\STARTUP.MP3")
Audiostream.PerformAction(1@, PLAY)

:NONAME_82
   Actor.DrivingVehicleType($PLAYER_ACTOR, #POLMAV)
jf @NONAME_1774 
wait 0 
Actor.StorePos($PLAYER_ACTOR, 11@, 12@, 13@)
if 
   not Actor.DrivingVehicleType($PLAYER_ACTOR, #POLMAV)
jf @NONAME_136 
Camera.Restore

:NONAME_136
if 
0AB0:   key_pressed 101 // turn on, numpad 5
jf @NONAME_396 
1@ = Audiostream.Load("CLEO\SOUND\STBY.MP3")
Audiostream.PerformAction(1@, PLAY)
14@ = Actor.CurrentCar($PLAYER_ACTOR)
if and
056E:   car 15@ defined 
056E:   car 16@ defined 
jf @NONAME_220 
jump @NONAME_382 

:NONAME_220
Model.Load(#SWMOCD)
Model.Load(#RCCAM)

:NONAME_230
wait 0 
if 
   Model.Available(#RCCAM)
jf @NONAME_230 
15@ = Car.Create(#RCCAM, 11@, 12@, 500.0)
16@ = Car.Create(#RCCAM, 11@, 12@, 500.0)
0683: attach_car 15@ to_car 14@ with_offset 0.0 3.0 -1.5 rotation 0.0 0.0 0.0 
0683: attach_car 16@ to_car 14@ with_offset 0.0 3.0 -1.5 rotation 0.0 0.0 0.0 
0338: set_car 15@ visibility 0 
0338: set_car 16@ visibility 0 
03F0: enable_text_draw 1 

:NONAME_382
Camera.OnVehicle(15@, 3, 1)
wait 1000 

:NONAME_396
056E:   car 15@ defined 
jf @NONAME_1767 
wait 0 
038E: draw_box_position 280.0 224.0 size 70.0 1.0 RGBA 255 255 255 255 
038E: draw_box_position 360.0 224.0 size 70.0 1.0 RGBA 255 255 255 255 
038E: draw_box_position 320.0 194.0 size 1.0 50.0 RGBA 255 255 255 255 
038E: draw_box_position 320.0 254.0 size 1.0 50.0 RGBA 255 255 255 255 
if 
  21@ == 1 
jf @NONAME_702 
038E: draw_box_position 320.0 194.0 size 80.0 1.0 RGBA 255 255 255 255 
038E: draw_box_position 320.0 254.0 size 80.0 1.0 RGBA 255 255 255 255 
038E: draw_box_position 280.0 224.0 size 1.0 60.0 RGBA 255 255 255 255 
038E: draw_box_position 360.0 224.0 size 1.0 60.0 RGBA 255 255 255 255 

:NONAME_702
0683: attach_car 15@ to_car 14@ with_offset 0.0 3.0 -1.5 rotation 0.0 0.0 0.0 
0683: attach_car 16@ to_car 14@ with_offset 0.0 3.0 -1.5 rotation 0.0 0.0 0.0 
if or
0AB0:   key_pressed 101 // turn off, numpad 5
   not Actor.DrivingVehicleType($PLAYER_ACTOR, #POLMAV)
jf @NONAME_848 
0931: lock_camera_zoom 0 
092F: lock_camera_target_point 0 
Camera.Restore
08B2: enable_thermal_vision 0 
08B1: enable_night_vision 0 
25@ = 0 
17@ = 1 
Car.Destroy(15@)
Car.Destroy(16@)
wait 500 

:NONAME_848
if 
0AB0:   key_pressed 100 // numpad 4
jf @NONAME_1152 
21@ += 1 
if 
  21@ == 1 
jf @NONAME_1127 
gosub @NONAME_1781 
19@ = 0 

:NONAME_902
if 
056D:   actor 19@ defined 
jf @NONAME_1034 
if 
00FE:   actor 19@ sphere 0 in_sphere 0@ 1@ 2@ radius 15.0 15.0 15.0 
jf @NONAME_1034 
067B: put_camera_on_car 15@ with_offset 0.0 0.0 -1.5 point_to_actor 19@ tilt 6.0 2 
1@ = Audiostream.Load("CLEO\SOUND\TARGET_L.MP3")
Audiostream.PerformAction(1@, PLAY)
jump @NONAME_1120 

:NONAME_1034
19@ += 1 
  19@ > 30000 
jf @NONAME_902 
0920: point_camera 0@ 1@ 2@ transverse_to 0@ 1@ 2@ time 500 smooth_transition 0 
092F: lock_camera_target_point 1 
1@ = Audiostream.Load("CLEO\SOUND\BEEP01.MP3")
Audiostream.PerformAction(1@, PLAY)

:NONAME_1120
jump @NONAME_1147 

:NONAME_1127
092F: lock_camera_target_point 0 
Camera.OnVehicle(15@, 3, 1)
21@ = 0 

:NONAME_1147
wait 1000 

:NONAME_1152
if 
0AB0:   key_pressed 102 // numpad 6
jf @NONAME_1556 
25@ += 1 
if 
  25@ == 1 
jf @NONAME_1236 
0931: lock_camera_zoom 0 
0922: set_camera_zoom_from 70.0 to 50.0 timelimit 500 smooth_transition 0 
wait 499 
0931: lock_camera_zoom 1 
0ACD: show_text_highpriority "ZOOM X8" time 500 

:NONAME_1236
if 
  25@ == 2 
jf @NONAME_1299 
0931: lock_camera_zoom 0 
0922: set_camera_zoom_from 50.0 to 30.0 timelimit 500 smooth_transition 0 
wait 499 
0931: lock_camera_zoom 1 
0ACD: show_text_highpriority "ZOOM X16" time 500 

:NONAME_1299
if 
  25@ == 3 
jf @NONAME_1362 
0931: lock_camera_zoom 0 
0922: set_camera_zoom_from 30.0 to 10.0 timelimit 500 smooth_transition 0 
wait 499 
0931: lock_camera_zoom 1 
0ACD: show_text_highpriority "ZOOM X32" time 500 

:NONAME_1362
if 
  25@ == 4 
jf @NONAME_1425 
0931: lock_camera_zoom 0 
0922: set_camera_zoom_from 10.0 to 30.0 timelimit 500 smooth_transition 0 
wait 499 
0931: lock_camera_zoom 1 
0ACD: show_text_highpriority "ZOOM X16" time 500 

:NONAME_1425
if 
  25@ == 5 
jf @NONAME_1487 
0931: lock_camera_zoom 0 
0922: set_camera_zoom_from 30.0 to 50.0 timelimit 500 smooth_transition 0 
wait 499 
0931: lock_camera_zoom 1 
0ACD: show_text_highpriority "ZOOM X8" time 500 

:NONAME_1487
if 
  25@ == 6 
jf @NONAME_1556 
0931: lock_camera_zoom 0 
0922: set_camera_zoom_from 50.0 to 70.0 timelimit 500 smooth_transition 0 
wait 499 
0931: lock_camera_zoom 1 
0ACD: show_text_highpriority "ZOOM X1" time 500 
25@ = 0 

:NONAME_1556
if 
0AB0:   key_pressed 103 // numpad 7
jf @NONAME_1760 
17@ += 1 
1@ = Audiostream.Load("CLEO\SOUND\BLIP3.MP3")
Audiostream.PerformAction(1@, PLAY)
if 
  17@ == 1 
jf @NONAME_1654 
0ACD: show_text_highpriority "NORMAL VISION" time 500 
08B2: enable_thermal_vision 0 

:NONAME_1654
if 
  17@ == 2 
jf @NONAME_1698 
0ACD: show_text_highpriority "NIGHT VISION ON" time 500 
08B1: enable_night_vision 1 

:NONAME_1698
if 
  17@ == 3 
jf @NONAME_1755 
0ACD: show_text_highpriority "THERMAL VISION ON" time 500 
08B1: enable_night_vision 0 
08B2: enable_thermal_vision 1 
17@ = 0 

:NONAME_1755
wait 500 

:NONAME_1760
jump @NONAME_396 

:NONAME_1767
jump @NONAME_82 

:NONAME_1774
jump @NONAME_23 

:NONAME_1781
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
0A9F: 5@ = current_thread_pointer 
5@ += 80 
0A8E: 6@ = 5@ + 12 // int 
0AA6: call_method 5327216 struct 11989032 num_params 6 pop 0 6@ 5@ 3@ 2@ 1@ 4@  
if 
86BD:   not no_obstacles_between 1@ 2@ 3@ and 8@ 9@ 10@ solid 1 car 0 actor 1 object 1 particle 1 
jf @NONAME_1900 
jump @NONAME_1931 

:NONAME_1900
4@ += 1.0 
if 
  4@ > 250.0 
jf @NONAME_1781 

:NONAME_1931
0@ = 0.0 
1@ = 0.0 
2@ = 0.0 
005B: 0@ += 8@ // (float) 
005B: 1@ += 9@ // (float) 
005B: 2@ += 10@ // (float) 
4@ = 0.0 
return 

 

Edited by AHNHYOEUN

Share this post


Link to post
Share on other sites
ZAZ

The entries key_down and print are unknown for the compiler

change all key_down into 0AB0:   key_pressed

//key_down 101
0AB0:   key_pressed 101//     numeric keypad 5 key


//key_down 100
0AB0:   key_pressed 100//     numeric keypad 4 key

 

and deactivate all print codes, type comment slashes infront

//print "ZOOM X8" 500

 

Share this post


Link to post
Share on other sites
AHNHYOEUN
12 minutes ago, ZAZ said:

The entries key_down and print are unknown for the compiler

change all key_down into 0AB0:   key_pressed

//key_down 101
0AB0:   key_pressed 101//     numeric keypad 5 key


//key_down 100
0AB0:   key_pressed 100//     numeric keypad 4 key

 

and deactivate all print codes, type comment slashes infront

//print "ZOOM X8" 500

 

It's corrected. please look again!

Share this post


Link to post
Share on other sites
AHNHYOEUN
1 hour ago, ZAZ said:

The entries key_down and print are unknown for the compiler

change all key_down into 0AB0:   key_pressed

//key_down 101
0AB0:   key_pressed 101//     numeric keypad 5 key


//key_down 100
0AB0:   key_pressed 100//     numeric keypad 4 key

 

and deactivate all print codes, type comment slashes infront

//print "ZOOM X8" 500

 

If it still doesn't compile, go to this link and download the .cs file. Sorry..
https://gamemodding.com/en/gta-san-andreas/cleo-scripts/51694-police-maverick-cam-mod.html

Share this post


Link to post
Share on other sites
ZAZ

i could compile it after the changes that i said

Share this post


Link to post
Share on other sites
AHNHYOEUN
14 minutes ago, ZAZ said:

i could compile it after the changes that i said

This time it was really edit. Look again..

Share this post


Link to post
Share on other sites
ZAZ
Posted (edited)
On 1/3/2020 at 2:41 AM, AHNHYOEUN said:

 

Hello, I am coding for CamHeli.cs.

 

1.

I solved all the other parts and only ran into issues below. It is normal for the function to turn off automatically when you get off the car.
But not "if or, if and". (It doesn't automatically turn off when you get in the car.)

Some people recommend using LOOP. But I'm not sure...not.DrivingVehicleType is 1 line, it acts as "if or".

 

However, if there are more than two lines, "if or, if and" will compile but will not work in in-game. I'm wondering how to fix it.

 

Please see below for details.

:NONAME_702
0683: attach_car 15@ to_car 14@ with_offset 0.0 3.0 -1.5 rotation 0.0 0.0 0.0 
0683: attach_car 16@ to_car 14@ with_offset 0.0 3.0 -1.5 rotation 0.0 0.0 0.0 
if or // if or = the function works but does not turn off again (it goes off when you get out of the car).
      // if and = function works, but it turns off again.
0AB0:   key_pressed 101 // turn off, numpad 5
   not Actor.DrivingVehicleType($PLAYER_ACTOR, #POLMAV)
   not Actor.DrivingVehicleType($PLAYER_ACTOR, #VCNMAV)
jf @NONAME_848 
0931: lock_camera_zoom 0 
092F: lock_camera_target_point 0 
Camera.Restore
08B2: enable_thermal_vision 0 
08B1: enable_night_vision 0 
25@ = 0 
17@ = 1 
Car.Destroy(15@)
Car.Destroy(16@)
wait 500 

 

 

 

try this

if or
0AB0:   key_pressed 101 // turn off, numpad 5
   not Actor.DrivingVehicleType($PLAYER_ACTOR, #POLMAV)
jf @NONAME_848 
0931: lock_camera_zoom 0 
092F: lock_camera_target_point 0 
Camera.SetBehindPlayer      //   2 codes to restore camera to default
Camera.Restore_WithJumpCut  //   2 codes to restore camera to default
08B2: enable_thermal_vision 0 
08B1: enable_night_vision 0 
25@ = 0 
17@ = 1 
Car.Destroy(15@)
Car.Destroy(16@)
wait 1500  // bigger delay because key to activate is same as key to deactivate
jump @NONAME_82// jump to start loop

 

 

Quote

And you can freely change your point of view like a real helicopter camera. However, the mouse pointer sometimes moves strangely.

what do you mean exactly?

As i pressed NUM4, then camera was sticky to a target, but i noticed that the target point moves away, when heli moves, especially when heli rotates

Edited by ZAZ

Share this post


Link to post
Share on other sites
AHNHYOEUN
8 hours ago, ZAZ said:

 

 

try this

if or
0AB0:   key_pressed 101 // turn off, numpad 5
   not Actor.DrivingVehicleType($PLAYER_ACTOR, #POLMAV)
jf @NONAME_848 
0931: lock_camera_zoom 0 
092F: lock_camera_target_point 0 
Camera.SetBehindPlayer      //   2 codes to restore camera to default
Camera.Restore_WithJumpCut  //   2 codes to restore camera to default
08B2: enable_thermal_vision 0 
08B1: enable_night_vision 0 
25@ = 0 
17@ = 1 
Car.Destroy(15@)
Car.Destroy(16@)
wait 1500  // bigger delay because key to activate is same as key to deactivate
jump @NONAME_82// jump to start loop

 

 

what do you mean exactly?

As i pressed NUM4, then camera was sticky to a target, but i noticed that the target point moves away, when heli moves, especially when heli rotates

Thank you very much for your kind reply.

 

The second bug in this article is that when you use Numpad 5 to use the feature, the viewpoint sometimes moves to a strange place.

I would like to solve this problem. Numpad 4 does not need to be solved.

 

The principle of this .cs is to summon the RCCam under POLMAV, make the RCCam invisible, and only fix the viewpoint to the RCCam.

In GTA: SA, I think it's the same principle that when you get in a car and put the viewpoint somewhere else, you move back to the original viewpoint.

 

Share this post


Link to post
Share on other sites
ZAZ

It seems to be a characteristic of this camera code

Camera.OnVehicle([email protected], 3, 1)

this is the opcode variation

0158: camera_on_car [email protected] mode 3 switchstyle 1

 

maybe you can find another mode that works better

 

(look in main.scm for 0158: , there's mostly used mode 15 or mode 18)

when mode 15, camera looks to 0.0 0.0 0.0
then it's often placed together with 015F:

015F: set_camera_position 2232.178 -1149.902 33.2809 rotation 0.0 0.0 0.0
0158: camera_on_car [email protected] mode 15 switchstyle 2

Share this post


Link to post
Share on other sites
AHNHYOEUN
20 hours ago, ZAZ said:

It seems to be a characteristic of this camera code

Camera.OnVehicle([email protected], 3, 1)

this is the opcode variation

0158: camera_on_car [email protected] mode 3 switchstyle 1

 

maybe you can find another mode that works better

 

(look in main.scm for 0158: , there's mostly used mode 15 or mode 18)

when mode 15, camera looks to 0.0 0.0 0.0
then it's often placed together with 015F:

015F: set_camera_position 2232.178 -1149.902 33.2809 rotation 0.0 0.0 0.0
0158: camera_on_car [email protected] mode 15 switchstyle 2

Mode 15 was completely fixed and could not be used, and 18 works similarly to 3.

But still not what I want. I sometimes want to stop the viewpoint from moving to strange places.

 

Is there any other way?

 

Also, I've also modified it in response to notActor.DrivingVehicleType. The result is not working properly.
If you enable the function by pressing Numpad 5, the function turns off after about 2 seconds (probably after wait 1500). I didn't turn it off again.

Share this post


Link to post
Share on other sites
ZAZ
18 minutes ago, AHNHYOEUN said:

Is there any other way?

give a camera target

 

Quote

Also, I've also modified it in response to notActor.DrivingVehicleType. The result is not working properly.
If you enable the function by pressing Numpad 5, the function turns off after about 2 seconds (probably after wait 1500). I didn't turn it off again.

use different key for en/disable and remove the wait 1500

Share this post


Link to post
Share on other sites
AHNHYOEUN
On 1/6/2020 at 2:38 AM, ZAZ said:

give a camera target

How can I write code? If you show an example, I will refer to it. sorry it's too late.

https://imgur.com/a/fRwdojg

 

The pointer moves like the link above. when I move the viewpoint with the mouse, I want to fix it to the last place.

Presumably, if you change the point of view after riding the vehicle in GTA: SA, I think it is similar to returning to the original state.

Share this post


Link to post
Share on other sites
ZAZ
On 4/20/2020 at 4:50 PM, AHNHYOEUN said:

 

On 1/5/2020 at 6:38 PM, ZAZ said:

give a camera target

How can I write code? If you show an example, I will refer to it. sorry it's too late.

forget that

 

camera moves away because heli is moving

you can only fix it if you lock the heli in position

but i assume that this isn't an option for you

 

Share this post


Link to post
Share on other sites
Strs
Posted (edited)

still have problem ? look in video @ Timeline 0:55 if it is what you looking for i can help a little 

 

Edited by Strs
forgot link

Share this post


Link to post
Share on other sites
𝓦𝓸𝓵𝓯

Add @33 the all.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.