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. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

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

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    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 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 Mods
    10. GTA Vice City

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

      1. Guides & Strategies
      2. Help & Support
      3. GTA 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  
12jango

I've questions about CLEO!

Recommended Posts

12jango

-I want to make the game will be slow down. What's the code?

-I wonder if there are code to make the player shooting while in air?

Share this post


Link to post
Share on other sites
gtasearcher

1.

015D: set_gamespeed 0.9 // 1.0 is normal

 

2. I doubt it's possible, only if making a moving object and putting the player in turret mode in it.

Share this post


Link to post
Share on other sites
12jango

- What's the code to make the player enable to aim&shoot while jumping?

Share this post


Link to post
Share on other sites
gtasearcher
- What's the code to make the player enable to aim&shoot while jumping?

There's in no code for that, I think it's impossible turn.gif

Share this post


Link to post
Share on other sites
12jango

-Please tell me all the commands in making Cleo (while_in_air, etc)

-And also how to use example : actor.setdrunkvisuals(), etc & player.setclothes()

I really have no idea how to use them, they also display actor,handle,and so on. Please tell me how to use those commands.

Share this post


Link to post
Share on other sites
gtasearcher

1. Enter Sanny Builder, press CTRL+ALT+2 and enter the damn Opcode Search Tool! There's a reason why it was built! mad.gif

2. Those are classes.

Sanny Builder Help -> Coding -> Classes

Share this post


Link to post
Share on other sites
atheoang3l0

 

1. Enter Sanny Builder, press CTRL+ALT+2 and enter the damn Opcode Search Tool! There's a reason why it was built! mad.gif

wow lol never knew that. lol.gif

 

I also have a CLEO question in mind. I don't want to create another topic, so I'll post it here:

See, I tried editing the Japanese dude's Gravity Gun mod (see link below) to turn the green glow of the gun to an orange one, so it would be more HL2-accurate, but when I tried compiling it I recognized the size of the new CS file is now bigger than it used to, even though I just edited a very small code. I tried testing it out myself, but it ends up crashing and stuff. I tried his other mods (compiling them), and it does the same (bigger size, bugs and crashes). Any idea why this happen? Is it Sanny Builder not being able to compile it right, or am I missing something (probably a compilation feature that I don't know about, or the dude is simply using an older version of Sanny Builder or another program)?

http://gtasamod.web.fc2.com/cleomod/

 

 

One topic is enough.

You do know this is actually a topic creation error or whatchamacallit? He didn't really make that replicate topic on purpose.

Edited by angeloelibz24

Share this post


Link to post
Share on other sites
Dutchy3010

It is possible to compile with less KB, when you turn off "Add extra info to SCM" (in options):

 

user posted image

 

And about that topic: a closed topic isn't a big problem if it's like this. I just wanted to avoid that he is helped in two different topics, that is a bit useless. wink.gif

Share this post


Link to post
Share on other sites
atheoang3l0

Another coding question.

 

When using the code "0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to [email protected] closest_ped_to [email protected]", will the variables contain the value -1 when there isn't any ped or vehicle? I tried using the code below to make ooscar713's Fatality mod crash-free for me (the mod causes the game to crash when there's no one to put a marker on), but then I end up making my mod non-functional when I do that.

 

ifnot [email protected] = -1else_jump @blah

 

 

And no, this is also not about that Disguise mod I'm talking about earlier. Even though it also has the same bug, I'm already done with that. I'm now currently working on another CLEO mod that summons a super suit that CJ can use to acquire special abilities. Quick Reflexes will be included in that mod. But tell me if there's already another mod of the like, so I won't have to release it and/or I can just use that mod if it is better than what I'm working on.

Edited by angeloelibz24

Share this post


Link to post
Share on other sites
Dutchy3010

I think it won't change at all (correct me if I'm wrong tounge.gif). So try this:

 

 

[email protected] = [email protected] = -10AB5: store_actor $PLAYER_ACTOR closest_vehicle_to [email protected] closest_ped_to [email protected] and8039:   not [email protected] == -18039:   not [email protected] == -1else_jump @bla

 

Keep in mind that it has to be "==" and not "=". The first is a comparison, which you have to use in a loop for example.

 

Share this post


Link to post
Share on other sites
atheoang3l0

 

Keep in mind that it has to be "==" and not "=". The first is a comparison, which you have to use in a loop for example.

I know, but I do remember typing in just one equals sign ("="). That's probably the mistake I committed when I was "debugging" ooscar713's mod. I'll try giving it a second try.

 

EDIT: *looks at the code I posted* Wait, I did type just one equals sign. lol.gif

Edited by angeloelibz24

Share this post


Link to post
Share on other sites
atheoang3l0

 

It is possible to compile with less KB, when you turn off "Add extra info to SCM" (in options):

Just did the editing thing just then, but still it didn't work. The size remains the same (when it was 5 KB, it remained 5 KB after re-compiling), but the crashes remain. Anything else I'm missing, or should use an older version of Sanny Builder (if there's still an available download link)? Oh yeah, it is the Time Stopper mod this time -- just added a simple code that makes you invincible while the mod is activated. I haven't tried editing the Gravity Gun mod yet.

 

http://gtasamod.web.fc2.com/cleomod/stop/index.html

Edited by angeloelibz24

Share this post


Link to post
Share on other sites
atheoang3l0

Never mind the Japanese dude's CLEO thing. I got it now.

 

Another coding question: Is it possible to have the game know the current weather and put it in a variable?

 

EDIT: Sh*t. Triple post. Can any of the moderators delete my 2 posts above? Or is double/triple/multi-posting allowed here?

Edited by angeloelibz24

Share this post


Link to post
Share on other sites
Doomed_Space_Marine
Another coding question: Is it possible to have the game know the current weather and put it in a variable?

Yes.

 

0A8D: [email protected] = read_memory 0xC81320 size 4 virtual_protect 0 //sets [email protected] to current weather0A8D: [email protected] = read_memory 0xC8131C size 4 virtual_protect 0 //sets [email protected] to upcoming weather

 

Share this post


Link to post
Share on other sites
atheoang3l0

Anything wrong in this CLEO code? It's suppose to make you invincible when it's 8 AM - 7 PM, but it doesn't.

 

 

{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------thread 'IMMORTAL' :IMMORTAL_1102A9: set_actor $PLAYER_ACTOR immune_to_nonplayer 002AB: set_actor $PLAYER_ACTOR immunities BP 0 FP 0 EP 0 CP 0 MP 00337: set_actor $PLAYER_ACTOR visibility 10446: set_actor $PLAYER_ACTOR immune_to_headshots 00568: set_actor $PLAYER_ACTOR targetable 104D8: set_actor $PLAYER_ACTOR drowns_in_water 10330: set_player $PLAYER_CHAR infinite_run 0jump @IMMORTAL_87 :IMMORTAL_87wait 0 if and00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes  [email protected] >= 8   not [email protected] > 19 jf @IMMORTAL_87 02A9: set_actor $PLAYER_ACTOR immune_to_nonplayer 102AB: set_actor $PLAYER_ACTOR immunities BP 1 FP 1 EP 1 CP 1 MP 10337: set_actor $PLAYER_ACTOR visibility 00446: set_actor $PLAYER_ACTOR immune_to_headshots 10568: set_actor $PLAYER_ACTOR targetable 004D8: set_actor $PLAYER_ACTOR drowns_in_water 00330: set_player $PLAYER_CHAR infinite_run 1 jump @IMMORTAL_196 :IMMORTAL_196wait 0 if and00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes  [email protected] >= 8   not [email protected] > 19 jf @IMMORTAL_11 jump @IMMORTAL_240

 

 

And don't say something like "just try this dude's mod" because this is actually a part of a mod I'm working on -- you can see that in the last line of code jump @IMMORTAL_240. Just wanna know why it doesn't make CJ immune to everything. Also, because it doesn't make CJ invincible in the coded time, the rest of the code from IMMORTAL_240 onwards doesn't work, too.

 

It can't be the opcodes not written along in the if_else codes, that's for sure, because I applied the same code to other mods, and they work.

 

Also, ignore those numerous and unnecessary "jump" and "wait" codes. tounge.gif I know they are unnecessary, or are they the ones that render this mod useless?

Share this post


Link to post
Share on other sites
Dutchy3010

Your mistake is this:

 

if and00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes

 

You can't put a opcode like that in an if-loop, you can only use conditions.

 

No, the jumps and waits don't effect the code. But it doesn't make the code more clear for yourself. I don't see any waits you could delete, though. But you can delete the jumps like this:

 

jump @IMMORTAL_87:IMMORTAL_87

 

That jump is just useless...

Share this post


Link to post
Share on other sites
james227uk

It's also worth putting a PLAYER-DEFINED check in the first label. Example:

 

 

:STARTwait 0if   Player.Defined($PLAYER_CHAR)jf @START

 

Share this post


Link to post
Share on other sites
atheoang3l0

 

Your mistake is this:

 

if and00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes

 

You can't put a opcode like that in an if-loop, you can only use conditions.

Actually you can in CLEO tounge.gif Like I said, I used the same if-else loop on other mods (that means they have the same opcode inside the if-else loop), and all of them worked but this. But I'll try putting it outside, and hope it works.

 

And I know those jumps and waits are useless, like what I've said. I'm just asking if they have any bad effect on the code.

 

EDIT: Tried it again, but it doesn't work still. There might be wrong with how the CLEO mod itself is loaded.

 

EDIT2: Just found out what's the problem. It's so happens that another CLEO mod I've installed, iTiTiT Multi mod to be specific, is canceling out the effect of my mod when I have God Mode cheat of the mod off. Just removed the God Mode code of the iTiTiT Multi mod, I hope it works this time.

Edited by angeloelibz24

Share this post


Link to post
Share on other sites
ZAZ

BTW. the player_actor immunities will be removed if player is set unfrozen.

I want to say:

Much script use

01B4: set_player $PLAYER_CHAR can_move 0

01B4: set_player $PLAYER_CHAR can_move 1

an older interpretation is:

01B4: set_player $PLAYER_CHAR frozen_state 0 (frozen)

01B4: set_player $PLAYER_CHAR frozen_state 1 (unfrozen)

player dont die while frozen state and his car won´t be wrecked

if he then is set to unfrozen (can_move 1) the immunity will be removed

Share this post


Link to post
Share on other sites
james227uk
Your mistake is this:

 

if and00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes

 

You can't put a opcode like that in an if-loop, you can only use conditions.

Actually you can in CLEO tounge.gif

Actually you can't tounge.gif I think Dutchy would know so there's no point arguing. Your telling the engine to check conditions on an opcode that isn't a check, tut tut, = Crash

Share this post


Link to post
Share on other sites
trickstar34
Your mistake is this:

 

if and00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes

 

You can't put a opcode like that in an if-loop, you can only use conditions.

Actually you can in CLEO tounge.gif

Actually you can't tounge.gif I think Dutchy would know so there's no point arguing. Your telling the engine to check conditions on an opcode that isn't a check, tut tut, = Crash

Yea, it sets those times to those vars, it doesn't check a condition.

Share this post


Link to post
Share on other sites
Dutchy3010

Actually, it is possible like that, I didn't know that either. It seemed logical that it was fault. tounge.gif I tried the following code myself, and it works:

 

{$CLEO .cs}:testwait 100if 00BF: [email protected] = current_time_hours, [email protected] = [email protected] > 8else_jump @test 0109: player $PLAYER_CHAR money += 1000000 0A93: end_custom_thread

 

Test if you don't believe me. tounge.gif However, I would prefer to do the 00BF opcode before the if-else_jump.

Share this post


Link to post
Share on other sites
trickstar34
Actually, it is possible like that, I didn't know that either. It seemed logical that it was fault. tounge.gif I tried the following code myself, and it works:

 

{$CLEO .cs}:testwait 100if 00BF: [email protected] = current_time_hours, [email protected] = [email protected] > 8else_jump @test 0109: player $PLAYER_CHAR money += 1000000 0A93: end_custom_thread

 

Test if you don't believe me. tounge.gif However, I would prefer to do the 00BF opcode before the if-else_jump.

That's weird, how does it work if it's not a condition?

Share this post


Link to post
Share on other sites
atheoang3l0

 

BTW. the player_actor immunities will be removed if player is set unfrozen.

I want to say:

Much script use

01B4: set_player $PLAYER_CHAR can_move 0

01B4: set_player $PLAYER_CHAR can_move 1

an older interpretation is:

01B4: set_player $PLAYER_CHAR frozen_state  0 (frozen)

01B4: set_player $PLAYER_CHAR frozen_state  1 (unfrozen)

player dont die while frozen state and his car won´t be wrecked

if he then is set to unfrozen (can_move 1) the immunity will be removed

I finally made it work, but sometimes it's get disabled, especially when I teleport. The unfrozen thing might be the problem.

 

Anyways, I decided to make "Super CJ" vincible and give him regenerative abilities instead. Even if it works, it's still giving me headaches.

 

The Clockstoppers mod still worries me though. What happens is that sometimes when I make CJ run while time is "stopped" (code-wise, in 0.02 speed), in normal game speed he as fast as, if not faster than the maximum falling speed so when I'm running then fell from something, I die instantly upon landing (like even by just stepping off from the sidewalk to the road). So I may still need to make CJ invincible, but in this case only when the game speed is set to 0.02. I'll also need to disable your (ZAZ) Teleport_to_X_Y mod while this mod is activated so the immunities won't be disabled.

 

 

Actually you can't tounge.gif I think Dutchy would know so there's no point arguing. Your telling the engine to check conditions on an opcode that isn't a check, tut tut, = Crash

I don't want to argue, but it really works (for some reason). Only in CLEO, I mean -- I tried applying it in SCM and, like you said, crash. Also, I've already said that I applied the same code (this opcode inside the if condition) to the rest of the mods like PLPynton/coin-god's Fly mod, still I can make CJ fly, shape-shift, slow-down time, make a "clone" of himself (RC CJ), teleport and blast a frickin' lazor (Master Spark) at daylight and lose all of these abilities when the clock reaches 7:00 PM without a single crash. tounge.gif

Share this post


Link to post
Share on other sites
atheoang3l0
So I may still need to make CJ invincible, but in this case only when the game speed is set to 0.02. I'll also need to disable your (ZAZ) Teleport_to_X_Y mod while this mod is activated so the immunities won't be disabled.

Speaking of which, I also forgot to ask: how can you get the current game speed and put it to a variable so I can use it in an if-condition?

Share this post


Link to post
Share on other sites
12jango

 

018C: play_sound 1052 at 0.0 0.0 0.0 

 

 

This opcode is use for playing any sounds. Am I right? dozingoff.gif

If so, please tell me the number for shotgun sound. icon14.gif

Share this post


Link to post
Share on other sites
ZAZ
018C: play_sound 1052 at 0.0 0.0 0.0 

 

 

This opcode is use for playing any sounds. Am I right? dozingoff.gif

If so, please tell me the number for shotgun sound. icon14.gif

don't know

look in AudioEvents.txt

try this:

 

018C: play_sound 1130 at 0.0 0.0 0.0wait 100009F1: play_audio_at_actor $PLAYER_ACTOR event 1159

 

Share this post


Link to post
Share on other sites
12jango

 

083D: get_actor $PLAYER_ACTOR velocity_in_direction_XYZ [email protected] [email protected] [email protected]: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ [email protected] [email protected] 10.0 

 

 

I ever see someone use these opcodes, and the effect is the player jumping high. happy.gif

I wonder how to make the player jump to the front/back. dozingoff.gif

Please tell me. icon14.gif

 

EDIT:

 

Hey, 2 more question.

 

how to make this

 

 

06BC: create_M4_shoot_from [email protected] [email protected] [email protected] target [email protected] [email protected] [email protected] energy 100

 

 

enable to crush objects? This one is only affect peds & vehicles. dontgetit.gif

 

What's this for?

 

 

0619: enable_actor [email protected] collision_detection 0 

 

 

Edited by 12jango

Share this post


Link to post
Share on other sites
ZAZ

 

083D: get_actor $PLAYER_ACTOR velocity_in_direction_XYZ [email protected] [email protected] [email protected]: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ [email protected] [email protected] 10.0 

 

 

I ever see someone use these opcodes, and the effect is the player jumping high. happy.gif

I wonder how to make the player jump to the front/back. dozingoff.gif

Please tell me. icon14.gif

try this

 

083D: get_actor $PLAYER_ACTOR velocity_in_direction_XYZ [email protected] [email protected] [email protected]@ *= -1083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ [email protected] [email protected] 10.0 

 

 

 

EDIT:

 

Hey, 2 more question.

 

how to make this

 

 

06BC: create_M4_shoot_from [email protected] [email protected] [email protected] target [email protected] [email protected] [email protected] energy 100

 

look here

 

 

enable to crush objects? This one is only affect peds & vehicles.  dontgetit.gif

 

What's this for?

 

 

0619: enable_actor [email protected] collision_detection 0 

 

enable collision_detection exist for peds, vehicles and objects, each as own opcode

it disable the collision of the model, the model have none solid body and no contact to the solid world

the effect by vehicles is wiered

enable collision_detection 1 enables the solid body

Share this post


Link to post
Share on other sites
12jango

I'm sorry, ZAZ. I meant how to make M4 shoots able to destroy/damage objects. notify.gif

 

EDIT:

 

 

083D: get_actor $PLAYER_ACTOR velocity_in_direction_XYZ [email protected] [email protected] [email protected]@ *= -1083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ [email protected] [email protected] 10.0 

 

 

This one isn't work. dontgetit.gif

 

Edited by 12jango

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

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

×

Important Information

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