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

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

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

      1. Recruitment
    2. Events

    1. GTA Online

      1. DLC
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
      7. The Diamond Casino Heist
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

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

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

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
yair1221

Turret

Recommended Posts

yair1221

 

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------thread 'PATRIOTTURRET' :PATRIOTTURRET_19wait 0 Model.Load(#MINIGUN)if   Actor.DrivingVehicleType($PLAYER_ACTOR, #PATRIOT)jf @PATRIOTTURRET_19 if 0AB0:   key_pressed 71 jf @PATRIOTTURRET_19 [email protected] = Actor.Car($PLAYER_ACTOR)Actor.SetCarWeapon($PLAYER_ACTOR, 38, 999999)0464: put_actor $PLAYER_ACTOR into_turret_on_car [email protected] at_car_offset -0.1 0.0 1.0 position 0 shooting_angle_limit 360.0 with_weapon 38 jump @PATRIOTTURRET_121 :PATRIOTTURRET_121if 0AB0:   key_pressed 71 jf @PATRIOTTURRET_121 0465: remove_actor $PLAYER_ACTOR from_turret_mode Model.Destroy(#MINIGUN)jump @PATRIOTTURRET_19 

 

 

its a simple code

and it should have work

i went through it a few times,and i dont know any alternatievs

if im pressing G then my actor is entering turret mode on the patriot

shooting with a minigun,no sight limit

Share this post


Link to post
Share on other sites
james227uk

Well for a start there is no wait 0 here

 

 

:PATRIOTTURRET_121if 0AB0:   key_pressed 71

 

 

You need to add

 

 

wait 0

 

 

after

 

 

:PATRIOTTURRET_121

 

Share this post


Link to post
Share on other sites
yair1221

oh

but that still doesnt explain why the actor doesnt ENTER turret mode

Share this post


Link to post
Share on other sites
BnB

 

oh

but that still doesnt explain why the actor doesnt ENTER turret mode

Put

0129: [email protected] = create_actor_pedtype 4 model #ARMY in_car [email protected] driverseat 

 

before this

 

0464: put_actor $PLAYER_ACTOR into_turret_on_car [email protected] at_car_offset -0.1 0.0 1.0 position 0 shooting_angle_limit 360.0 with_weapon 38 

 

*Load the model of the driver first

icon14.gif

Edited by BnB

Share this post


Link to post
Share on other sites
yair1221

oh

its necissary to have a driver?

Share this post


Link to post
Share on other sites
BnB
oh

its necissary to have a driver?

Try it...

 

Share this post


Link to post
Share on other sites
yair1221

doesnt work

my game crashes

maybe because IM already at the driver seat

 

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------thread 'PATRIOTTURRET' :PATRIOTTURRET_19wait 0 Model.Load(#MINIGUN)model.Load(#ARMY)if   Actor.DrivingVehicleType($PLAYER_ACTOR, #PATRIOT)jf @PATRIOTTURRET_19 if 0AB0:   key_pressed 71 jf @PATRIOTTURRET_19 [email protected] = Actor.Car($PLAYER_ACTOR)Actor.SetCarWeapon($PLAYER_ACTOR, 38, 999999)0129: [email protected] = create_actor_pedtype 4 model #ARMY in_car [email protected] driverseat 0464: put_actor $PLAYER_ACTOR into_turret_on_car [email protected] at_car_offset -0.1 0.0 1.0 position 0 shooting_angle_limit 360.0 with_weapon 38 jump @PATRIOTTURRET_121 :PATRIOTTURRET_121wait 0if 0AB0:   key_pressed 71 jf @PATRIOTTURRET_121 0465: remove_actor $PLAYER_ACTOR from_turret_modeactor.DestroyInstantly([email protected])036A: put_actor $PLAYER_ACTOR in_car [email protected] Model.Destroy(#MINIGUN)model.Destroy(#ARMY)jump @PATRIOTTURRET_19 

 

Share this post


Link to post
Share on other sites
BnB

Here is your code !

 

{$CLEO .cs}0000: NOP                         :mini_26 wait 0   if    Player.Defined($PLAYER_CHAR)    else_jump @mini_26 :MINI_27model.Load(#MINIGUN)model.Load(#ARMY):10001: wait 0 ms 00D6: if and0248:   model #MINIGUN available 0248:   model #ARMY available jf @1 :MINI_39wait 0 msif00DD: actor $PLAYER_ACTOR driving_car_with_model #PATRIOTjf @MINI_3903C0: [email protected] = actor $PLAYER_ACTOR car              :MINI_77                                                   0001: wait 0 ms 00D6: if and  00DB:   actor $PLAYER_ACTOR in_car [email protected] 00E1:   player 0 pressed_key 11 004D: jump_if_false @MINI_77:MINI_77c0129: [email protected] = create_actor_pedtype 4 model #ARMY in_car [email protected] driverseat 0001: wait 0 ms 06A7: put_actor $PLAYER_ACTOR into_turret_on_car [email protected] at_car_offset -0.2 0.0 2.0 position 1 shooting_angle 360.0 0.0 with_weapon 38 repeatwait 0until 0AB0:   key_pressed 80 // p0465: remove_actor $PLAYER_ACTOR from_turret_mode 00A6: destroy_car [email protected]: remove_references_to_actor [email protected]: remove_references_to_car [email protected]: release_model #ARMY 0249: release_model #MINIGUN 0002: jump @MINI_26 

 

anuj_cop.giffacedesk.gif I AM SURE THAT IT WORKS

Edited by BnB

Share this post


Link to post
Share on other sites
yair1221

doesnt work

im supposed to press control right?

by the way,what does that NOP supposed to mean?

Edited by yair1221

Share this post


Link to post
Share on other sites
BnB
doesnt work

im supposed to press control right?

by the way,what does that NOP supposed to mean?

Press y to put player on turret mod and press p to remove player from turret mod

i don't know my code is draft i had already made that code! smile.gif

Share this post


Link to post
Share on other sites
yair1221

it works!

but is there a way to see it in third person mode?

and when i try to change the key it doesnt works

anyway thanks

great help biggrin.gif

Edited by yair1221

Share this post


Link to post
Share on other sites
BnB

 

it works!

but is there a way to see it in third person mode?

and when i try to change the key it doesnt works

anyway thanks

great help biggrin.gif

If you want to change the key you should have notice

 

00E1:   player 0 pressed_key 11 

 

that opcode dosen't works with cleo keys like 80

so change this

 

00E1:   player 0 pressed_key 11 

 

to this

 

0AB0:   key_pressed 80 // p

 

which is cleo opcode

Edited by BnB

Share this post


Link to post
Share on other sites
yair1221

oh ok thank you!

Share this post


Link to post
Share on other sites
BnB

 

oh ok thank you!

The code must be edit because if the car flip the actor will be still in turret mod and

when the car is destroyed actor will be still in turret mod and it has big bugs. I tried to fix the bugs but did not manage to fix them and i quit

trying a month ago.

Edited by BnB

Share this post


Link to post
Share on other sites
yair1221

ill manage trough

ill just create a script which keeps checking if the car is flipped

then return it to normal if it is

Share this post


Link to post
Share on other sites
BnB

Try but it won't be easy to fix the bugs yin-yang.gif

I really want to help you viddy_pirate.gif

Edited by BnB

Share this post


Link to post
Share on other sites
yair1221

oof

anyway,do you know how to make the turret mode third-person?

is that even possible?

maybe take the camera back

Share this post


Link to post
Share on other sites
BnB

 

oof

anyway,do you know how to make the turret mode third-person?

is that even possible?

maybe take the camera back

I think it is impossible. If you want to see how it is then

put the player on turrent mod and press F1 to see the

replay which is in third person.

Edited by BnB

Share this post


Link to post
Share on other sites
yair1221

ok let me know as soon as you something pops up

Share this post


Link to post
Share on other sites
BnB

I edited a little the code so now the car drives to the target marker.

(It stops at traffic lights)

 

Share this post


Link to post
Share on other sites
yair1221

I know that code but it never works for me sad.gif

ill see if i can make it to work

Share this post


Link to post
Share on other sites
BnB
I know that code but it never works for me sad.gif

ill see if i can make it to work

I used this

 

05D1: AS_actor [email protected] drive_car [email protected] to [email protected] [email protected] [email protected] speed 18.0 0 model #PATRIOT 0

 

not this

 

00A7: car [email protected] drive_to [email protected] [email protected] [email protected]

 

Share this post


Link to post
Share on other sites
yair1221

whats the deal with the model #patriot 0?

Share this post


Link to post
Share on other sites
BnB

 

whats the deal with the model #patriot 0?

I don't know what #patriot does but 0 is the traffic behaviour

Edited by BnB

Share this post


Link to post
Share on other sites
yair1221

tounge.gif

ill try

Share this post


Link to post
Share on other sites
yair1221

actually,im building something else right now:

 

{$CLEO}thread 'TurretFire':1wait 0ifactor.InCar($player_actor, $HUMMER)jf @1repeatwait 0until 0AB0:  key_pressed 96wait 0object.StorePos($hummerminigun, [email protected], [email protected], [email protected])camera.SetBehindPlayer() wait 0068E: get_camera_target_point_to [email protected] [email protected] [email protected] 06BC: create_M4_shoot_from [email protected] [email protected] [email protected] target [email protected] [email protected] [email protected] energy 1jf @1

 

 

its a machine gun positioned on the patriot which fires forward every time you press 0

but the game crashes,so im still working on that

Share this post


Link to post
Share on other sites
BnB
actually,im building something else right now:

 

{$CLEO}thread 'TurretFire':1wait 0ifactor.InCar($player_actor, $HUMMER)jf @1repeatwait 0until 0AB0:  key_pressed 96wait 0object.StorePos($hummerminigun, [email protected], [email protected], [email protected])camera.SetBehindPlayer() wait 0068E: get_camera_target_point_to [email protected] [email protected] [email protected] 06BC: create_M4_shoot_from [email protected] [email protected] [email protected] target [email protected] [email protected] [email protected] energy 1jf @1

 

 

its a machine gun positioned on the patriot which fires forward every time you press 0

but the game crashes,so im still working on that

Don't use globals in cleo like $hummer use locals like [email protected]

First ypu have to CREATE THE OBJECT

 

camera.SetBehindPlayer() 

 

??? dontgetit.gif

Share this post


Link to post
Share on other sites
yair1221

no the object was created in a different code

 

 

 

camera.SetBehindPlayer()

 

 

???

 

 

it is so the camera target will be on the middle,staright in front of the minigun

which was created in a differend code

 

Share this post


Link to post
Share on other sites
BnB

The camera will be like driving.

 

camera.SetBehindPlayer()

 

this is incorrect /\

 

camera.SetBehindPlayer($PLAYER_ACTROR)

 

Share this post


Link to post
Share on other sites
yair1221

camera.SetBehindPlayer($PLAYER_ACTOR)

thats not how it is supposed to be

there is no need for handle there

but i dont think thats the problem

the thing is

i can see that the camera DOES reset behind the player and THEN the game crashes

Edited by yair1221

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.
Note: Your post will require moderator approval before it will be visible.

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.

Sign in to follow this  

  • 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.