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. Los Santos Summer Special
      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

FreezIn

Is there a opcode to detect/get weather?

Recommended Posts

FreezIn

Basic question here lol is there a opcode to get weather? Since 00BF gets time, i would assume there would be a opcode to get weather, or am I wrong? Couldn't find it on the list of opcodes https://www.gtamodding.com/wiki/List_of_opcodes but something keeps telling me that there is a opcode that could do that...

Edited by FreezIn

Share this post


Link to post
Share on other sites
deltaCJ

There is an opcode for it,

 

01B6: set_weather 1

 

01B5: force_weather 1

 

01B7: release_weather

 

and just in case it's day time and the time says 23:00 (very rarely)

 

0915: sync_weather_with_time_and_location_instantly

 

 

EDIT: Never mind i read your thing wrong...

 

There is an address for it though...

 

I think it is:

 

0xC81320 - [word] Current weather.

Edited by deltaCJ

Share this post


Link to post
Share on other sites
FreezIn

Wait so I'm new to cleo, not really exactly sure what addresses do. But how would I use that address to make it get weather? Like I want to make the script get the current weather id, then store that in a variable, so that I can change the visibility of an object/model, when that specific weather is currently in game.

 

EDIT: How would I know what the value of the memory is?

Edited by FreezIn

Share this post


Link to post
Share on other sites
deltaCJ

Well what do you want to make visible?

 

Tell me the purpose of your mod

Share this post


Link to post
Share on other sites
deltaCJ

I don't think I did this right, but you can test this out and play with it:

{$CLEO .cs}thread 'SUN'0000: NOPmodel.Load(#BMYST)038B: load_requested_modelswait 5000A8D: [email protected] = read_memory 0xC81320 size 4 virtual_protect 0:SUNwait 0if    [email protected] == 1jf @SUNActor.Create([email protected], GANG1,#BMYST, 0.0, 0.0, 0.0)jump @SUNwhile true    if        actor.Dead([email protected])    then        jump @SUN    else        jump @SUN    endendend_thread

This makes it so if you are in LS and it is sunny, it will spawn a character at the coordinates you put.

 

And if it's dead it'll just restart all over again.

 

Here are the weather values:

 

0 = EXTRASUNNY_LA
1 = SUNNY_LA
2 = EXTRASUNNY_SMOG_LA
3 = SUNNY_SMOG_LA
4 = CLOUDY_LA
5 = SUNNY_SF
6 = EXTRASUNNY_SF
7 = CLOUDY_SF
8 = RAINY_SF
9 = FOGGY_SF
10 = SUNNY_VEGAS
11 = EXTRASUNNY_VEGAS (heat waves)
12 = CLOUDY_VEGAS
13 = EXTRASUNNY_COUNTRYSIDE
14 = SUNNY_COUNTRYSIDE
15 = CLOUDY_COUNTRYSIDE
16 = RAINY_COUNTRYSIDE
17 = EXTRASUNNY_DESERT
18 = SUNNY_DESERT
19 = SANDSTORM_DESERT
20 = UNDERWATER (greenish, foggy)
21 = EXTRACOLOURS_1 (very dark, gradiented skyline, purple) Used for interiors?
22 = EXTRACOLOURS_2 (very dark, gradiented skyline, green) Used for interiors?

  • Like 1

Share this post


Link to post
Share on other sites
FreezIn

Bro, thank you so much! Finally got the answer in looking for!

  • Like 1

Share this post


Link to post
Share on other sites
deltaCJ

Anytime man! In surprised it even worked LOL

Share this post


Link to post
Share on other sites
Seemann

Me surprised either as if the ped is not dead your code jumps at ped creation block again, and again, and again...

The correct code would be something like:

 

{$CLEO .cs}0000:const    SUNNY_LA = 1end while true    wait 250    0A8D: [email protected] = read_memory 0xC81320 size 4 virtual_protect 0    if        [email protected] == SUNNY_LA    then            model.Load(#BMYST)        038B: load_requested_models        Actor.Create([email protected], GANG1,#BMYST, 0.0, 0.0, 0.0)                while not Actor.Dead([email protected])            wait 250                end        Actor.DestroyWithFade([email protected])    endend//0A93: end_custom_thread
  • Like 2

Share this post


Link to post
Share on other sites
FreezIn

I wasn't actually gonna use that code, i just needed to know how you would use memory addresses in the sanny builder thing lol.

But now im looking at some other codes, and I see things like this:

 

00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes

 

So I know that 00BF gets the time in game and stores it in [email protected] and [email protected], but what is exactly "current_time_hours" and "current_time_minutes"?

Are these like data types or something? I can't find anything about them on google. Can I like find a list of them, just like opcodes?

Edited by FreezIn

Share this post


Link to post
Share on other sites
deltaCJ

Current hour and current min is just the current time in hours and in min

Share this post


Link to post
Share on other sites
FreezIn

But what is the exact purpose? Like what does it do lol. I don't know if you can understand what i'm trying to get at :3

Share this post


Link to post
Share on other sites
X-Falcon

You could test it in the game by reading value variable [email protected] and [email protected] store with opocode 0AD1: show formatted text. it's actually way get current clock like HUD showed.

{$CLEO}0000:while true0001: wait 0 ms00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes0AD1: show_formatted_text_highpriority "Current Clock is %d : %d" time 2000 read_variable hours [email protected] minutes [email protected]

Basicaly opcode 00BF is mostly use for check game hours. Such misc mission of "The Chiliad Challenge" using this for check the hours in game is not evening or night so you only can start that challenge at hours 7 until 18.

:ODDVEH_53300D6: if and00DD:   actor $PLAYER_ACTOR driving_car_with_model #MTBIKE0038:   $ONMISSION_Chiliad == 0004D: jump_if_false @ODDVEH_72200BE: text_clear_all0652: $STAT_Cycling_Skill = integer_stat 23000D6: if0028:   $STAT_Cycling_Skill >= 400004D: jump_if_false @ODDVEH_67900BF: $Time_Hours = current_time_hours, $Time_Mins = current_time_minutes00D6: if and0028:   $Time_Hours >= 7001A:   18 > $Time_Hours004D: jump_if_false @ODDVEH_65600BA: show_text_styled GXT 'MOUNTN' time 1000 style 2  // The Chiliad Challenge0417: start_mission MTBIKER // The Chiliad Challenge0004: $ONMISSION_Chiliad = 1// .............................................

Share this post


Link to post
Share on other sites
FreezIn

Okay I literally just tried everything on this thread and read like all the cleo tutorials but it doesn't work like it is supposed to.

 

So long story short, I'm trying to edit a skybox cleo file, so that I can have different clouds for sunny weathers and rainy weathers. So here's my code.

 

By default it only loads model 4227, which is the normal blue cloudy sky, 8319 is the model i added for rainy weathers.

// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013{$CLEO .cs}//-------------MAIN---------------thread 'NEBO' :NEBO_11wait 10 if    Player.Defined($PLAYER_ACTOR)else_jump @NEBO_11 [email protected] = 30 if wait 100 Model.Load(4227)Model.Load(8319)if and  Model.Available(4227)   Model.Available(8319)else_jump @NEBO_11 wait 100 [email protected] = object.Create(4227, 1.0, 1.0, -32.0) // normal blue sky0750: set_object [email protected] visibility 0 Object.CollisionDetection([email protected]) = [email protected] = Object.Create(8319, 1.0, 1.0, -32.0) // rainy skyObject.CollisionDetection([email protected]) = Falsewait 100 jump @NEBO_158 :NEBO_158                              wait 0 0A8D: [email protected] = read_memory 0xC81320 size 4 virtual_protect 000BF: [email protected] = current_time_hours, [email protected] = current_time_minutes if and  [email protected] >= 5   7 > [email protected] or  [email protected] <> 8  16 <> [email protected]_jump @NEBO_209 0750: set_object [email protected] visibility 00750: set_object [email protected] visibility 1jump @NEBO_216 :NEBO_2090750: set_object [email protected] visibility 10750: set_object [email protected] visibility 0:NEBO_216068D: get_camera_position_to [email protected] [email protected] [email protected] if and  [email protected] >= 5  7 > [email protected] or  [email protected] <> 8  16 <> [email protected]_jump @NEBO_159object.PutAt([email protected], [email protected], [email protected], [email protected])069A: attach_object [email protected] to_object [email protected] with_offset 0.0 0.0 0.0 rotation 0.0 0.0 0.0 jump @NEBO_160:NEBO_159object.PutAt([email protected], [email protected], [email protected], [email protected])069A: attach_object [email protected] to_object [email protected] with_offset 0.0 0.0 0.0 rotation 0.0 0.0 0.0 :NEBO_160jump @NEBO_158 wait 100 Object.Destroy([email protected])Object.Destroy([email protected])jump @NEBO_11 

I'm not sure what the hell is wrong with it, maybe my nested if-statements are incorrect or something? To me it looks pretty logical in my head though lol. Maybe my syntax/variables are wrong?

Edited by FreezIn

Share this post


Link to post
Share on other sites
X-Falcon

This script from shemer skybox. Saddly the script is too many useless wait, incorrect conjunction of opocode, wrong place to put jump itteration, and overload model case, also one of them kill performance. Really if you wanna edit it better fix first or your step will follow the same error.

Share this post


Link to post
Share on other sites
FreezIn

How would I go about fixing it?

Share this post


Link to post
Share on other sites
deltaCJ

0A8D: [email protected] = read_memory 0xC81320 size 4 virtual_protect 0
00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes

 

you replaced the memory you read.

 

That's pretty wrong.

 

:NEBO_160
jump @NEBO_158
wait 100
Object.Destroy([email protected])
Object.Destroy([email protected])
jump @NEBO_11

 

you make it jump right away???? what is the point of this thread?

Edited by deltaCJ
  • Like 1

Share this post


Link to post
Share on other sites
spaceeinstein

Just a note, in Sanny Builder, anything that's not compilable data is superfluous and is there mainly for human readability, kind of like inline comments. Opcodes in its base form looks like this:

 

00BF: [email protected] [email protected]
But if you only see lines like that, everyone would be confused as to what they mean. So Sanny Builder allows you to put anything that's not compilable data in between compilable data, like this:

 

00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes
"= current_time_hours," and "= current_time_minutes" are ignored by the compiler entirely.

 

Also note, generally when writing code from scratch, you should write in steps and get that to work in the game first before moving on to the next step. Writing everything in one go before even starting the game will make it very difficult to find where you erred. Using your code for example, write something that only, and only, spawns in object 4227. If that works, then you can move on to the next step of spawning in object 8319. Etc. Work up until something breaks, then you can easily revert the problem.

  • Like 2

Share this post


Link to post
Share on other sites
X-Falcon

from begin the Code is executed with incorect param by Player.Defined($PLAYER_ACTOR)

this one of example wrong understand in using classes with no tested if they converted in opocode.

Player.Defined($PLAYER_ACTOR)

it's not same with:

056D:   actor [email protected] defined

player classes is applied opocode 0256 which it check if player can playing when CJ nor in busted or wasted.

:karmaeater:

And originally mission R* code (main.scm) never been use $Player_Actor for paramater 0256 and 056D because $Player_Actor always defined.

But 0256 is moslty use for check player_char (you) and 056D for check handle actors if they exist.

By default the value which contain in $Player_Char = 0 and $PLAYER_ACTOR = 1 but most people use in the form global variable, free.

 

and the correction is must:

00D6: if0256:   player $PLAYER_CHAR {0} defined

acually myself not using skybox, but mainly the skybox i see also knowed that use 4 script.

which the 4 script looping 0247: load_model (any_ID) continues, create object in form ball, and have such different clocks.

 

Sanny Builder also builded tool conversion for Hex, dec, number of model with hotkey Ctrl+H.

 

Ctrl+H convert a number under the cursor from decimal to hexadimal and vice versa Ctrl+Alt+H convert a model name under the cursor to its numeric ID and vice versa

 

if you complie the script sometime the model name converted as numeric id as default

Model.Load(4227)

but you can turn it into model name to make that good for reading with move your cursor at (num id) and press CTRL + ALT+ H.

Model.Load(#GRAFFITI_LAN01)

So now here before:

:NEBO_11wait 10 if Player.Defined($PLAYER_ACTOR) // xelse_jump @NEBO_11 [email protected] = 30 // uselessifwait 100 Model.Load(4227)Model.Load(8319)if andModel.Available(4227)Model.Available(8319)else_jump @NEBO_11 

Now delete at all and replace from begin that code started:

// load model at begin if possible at check if not available because if model has loaded it has saved// and no chance for secondary at least stream at capacity.ifnot #graffiti_lan01.Availablethen    #graffiti_lan01.Loadendifnot #bdups_graf.Availablethen    #bdups_graf.Loadendifnot #VEGSTADPLANTS1.Availablethen    #VEGSTADPLANTS1.Loadendwhile true    0001: wait 0 ms    00D6: if    0256:   player $Player_Char defined // 0256:   player $PLAYER_ACTOR defined x    then    //....................... begin    endend

and using 0382 sound like must recheck before.

0382: set_object [email protected] collision_detection 0 is object really have a collision ?
  • Like 1

Share this post


Link to post
Share on other sites
FreezIn

@spaceeinstein: You just answered my previous question on my other post, thanks alot.

 

@deltaCJ: Honestly, im not too sure what was the point of that thread. The way i read it was, it first jumps to thread 158 then destroys the spawned object, and then jump back to thread 11. I guess apparently, once you jump to another thread, anything below it gets ignored.

 

But wow, didn't even know how messed up the code was because everything seems so logical in my head lol. Gotta try this stuff when I've got time.

 

So i need someone to clear some of my other questions.

 

- Is there a list I can find all the keywords for every opcode? This scripting tutorial thread only lists a few http://gtaforums.com/topic/403594-sa-cleo-script-tutorial/or is that all of the keywords available from Sanny?

 

- I also got a question on the "while true" part of X - Falcon's code. Which part of the code is it asking if its true? Because didn't all the if statements were ended since they all have "end" after each if?

 

And is it okay if I just put

wait 0 msif  player $Player_Char defined // 0256:   player $PLAYER_ACTOR defined x

instead of adding the opcode before it?

 

And about the set object collision thing, i was skeptical if it actually had a purpose since the model itself is just a graffiti texture, which shouldnt have any collision, but i still left it there

 

Thank you to everyone who have helped me so far :D

Edited by FreezIn

Share this post


Link to post
Share on other sites
deltaCJ

Okay, trying to recreate your script, I got this:

{$CLEO .cs}0000:NOP 0thread 'SKYBOX'0A8D: [email protected] = read_memory 0xC81320 size 4 virtual_protect 000BF: [email protected] = current_time_hours, [email protected] = current_time_minutes:SKYBOXwait 0model.Load(YOURMODEL)model.Load(YOURMODEL)wait 100:SKYBOX_001wait 0if    model.Available(YOURMODEL)    model.Available(YOURMODEL)then     jump @SKYBOX_002else    jump @SKYBOX_001:SKYBOX_002wait [email protected] = object.Create(YOURMODEL, 1.0, 1.0, -32.0) // 0750: set_object [email protected] visibility 0 Object.CollisionDetection([email protected]) = [email protected] = Object.Create(YOURMODEL, 1.0, 1.0, -32.0) // rainy skyObject.CollisionDetection([email protected]) = False0750: set_object [email protected] visibility 0wait 50:SKYBOX_003wait 0if and  [email protected] >= 5   19 > [email protected]_jump @SKYBOX_003if or  [email protected] <> 8  16 <> [email protected]_jump @SKYBOX_0040750: set_object [email protected] visibility 10750: set_object [email protected] visibility 0jump @SKYBOX_005:SKYBOX_0040750: set_object [email protected] visibility 00750: set_object [email protected] visibility 1:SKYBOX_005wait 0068D: get_camera_position_to [email protected] [email protected] [email protected] if and  [email protected] >= 5  19 > [email protected]_jump @SKYBOX_005if or  [email protected] <> 8  16 <> [email protected]_jump @SKYBOX_006object.PutAt([email protected], [email protected], [email protected], [email protected])069A: attach_object [email protected] to_object [email protected] with_offset 0.0 0.0 0.0 rotation 0.0 0.0 0.0 jump @NEBO_160:SKYBOX_006object.PutAt([email protected], [email protected], [email protected], [email protected])069A: attach_object [email protected] to_object [email protected] with_offset 0.0 0.0 0.0 rotation 0.0 0.0 0.0

This isn't the whole script as i didn't feel like doing the whole thing ( :p)

 

But, you had the skybox appear only between 2 hours (5 AM to 7AM)

So i thought you were asking for 5 am to 7 PM which is 19:00

I left everything the same as your code, but changed many things. Like useless waits, and fixed syntax.

 

I don't do a lot of stuff with CLEO, so hopefully X-Falcon can tell me whats wrong with mine, and hopefully that can solve yours.

 

 

 

Answering your questions:

 

1.) What keywords? like wait? Keywords are just commands that replace simple opcodes.

 

Ex: jump, else_jump, jf, fade 0 0, fading, and more...

 

2.) No the END is to end the syntax, and when the syntax ends it just goes on to the next one. Also while true is talking about whatever is UNDER it.

 

Here is example of syntax in the Sanny Builder Help:

 

2. Sanny Builder supports high-level constructions
IF..THEN..END
IF..THEN..ELSE..END*

A condition is created by the rules described above.
After the word THEN, you have to specify the command(-s) that are executed if the condition is true.
After the word ELSE, you have to specify the command(-s) that are executed if the condition is false.

The IF statement is closed by word End.

 

3. And no. You MUST have opcode (unless it keyword.)

 

 

 

EDIT: And if you want some help on keywords, go ahead and press CTRL + SPACE in Sanny Builder.

Edited by deltaCJ
  • Like 1

Share this post


Link to post
Share on other sites
X-Falcon

It's called while loop which a guides can be found on sanny builder help > contents or pressing F12 (Hotkey).

And is it okay if I just put

wait 0 msif  player $Player_Char defined // 0256:   player $PLAYER_ACTOR defined x
instead of adding the opcode before it?

 


wait 0 ms and if have own keywords for reading itself on Sanny builder / data, you can make own keyword for player defined but SB implanted method for everyone use it with classes or opcodes. Remember but classes is still not wide than you search opocodes.

Player.Defined($Player_Char)
0256: player $Player_Char defined 

what i think is using what needed, fix the loop, and building effecient all in one:

{$CLEO}const    EXTRASUNNY_LA = 0    SUNNY_LA = 1    EXTRASUNNY_SMOG_LA = 2    SUNNY_SMOG_LA = 3    CLOUDY_LA = 4    SUNNY_SF = 5    EXTRASUNNY_SF = 6    CLOUDY_SF = 7    RAINY_SF = 8    FOGGY_SF = 9    SUNNY_VEGAS = 10    EXTRASUNNY_VEGAS (heat waves) = 11    CLOUDY_VEGAS = 12    EXTRASUNNY_COUNTRYSIDE = 13    SUNNY_COUNTRYSIDE = 14    CLOUDY_COUNTRYSIDE = 15    RAINY_COUNTRYSIDE = 16    EXTRASUNNY_DESERT = 17endifnot #graffiti_lan01.Availablethen    #graffiti_lan01.Loadendifnot #bdups_graf.Availablethen    #bdups_graf.Loadendifnot #VEGSTADPLANTS1.Availablethen    #VEGSTADPLANTS1.Loadendwhile if 8ADC:   not test_cheat "end"    0001: wait 0 ms    00D6: if    0256:   player $Player_Char defined // 0256:   player $PLAYER_ACTOR defined x    then        068D: get_camera_position_to [email protected] [email protected] [email protected]        0A8D: [email protected] = read_memory 0x00B6F248 size 4 virtual_protect false // X Angle view        0A8D: [email protected] = read_memory 0xC81320 size 4 virtual_protect 0 // Current weather        00D6: if or        8038:    not $Active_Interior == 0 // Outdoor        0039:    [email protected] == CLOUDY_LA // Exceptions in some weathers        0039:    [email protected] == CLOUDY_SF        0039:    [email protected] == FOGGY_SF        0039:    [email protected] == CLOUDY_VEGAS        0039:    [email protected] == CLOUDY_COUNTRYSIDE        0033:   -1.0 >= [email protected]        then            gosub @sub_Destroy_Nebos            continue        end        //0AD1: show_formatted_text_highpriority "Current weather %d Model %d set %d" time 200 [email protected] [email protected] [email protected]        :for_current_time        00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes        00D6: if and        0028:   [email protected] >= 5 am        001A:   20 pm > [email protected]        then            [email protected] = #graffiti_lan01 // when the sun is bright        else            [email protected] = #bdups_graf // Star in the sky        end        00D6: if or        0039:   [email protected] == RAINY_SF        0039:   [email protected] == RAINY_COUNTRYSIDE        then            [email protected] = #VEGSTADPLANTS1 // rain weather        {else            can uncomment if ready for operating other weather}        end        00D6: if or        8039:   not  [email protected] == [email protected]  //  is model changed        83CA:   not  object [email protected] exists        then            0050: gosub @sub_Destroy_Nebos            0249: release_model [email protected]            0107: [email protected] = create_object [email protected] (ID) at [email protected] [email protected] [email protected]            0085: [email protected] = [email protected] // (int)                        //0750: set_object [email protected] visibility 1 is object really doesn't appear ?            //0382: set_object [email protected] collision_detection 1 is object really have a col ?        end        if or        8045:   not  [email protected] == [email protected]  // object coordinate changed when camera moved only        8045:   not  [email protected] == [email protected]        8045:   not  [email protected] == [email protected]        then            01BC: put_object [email protected] at [email protected] [email protected] [email protected]            068D: get_camera_position_to [email protected] [email protected] [email protected]        end    endend0050: gosub @sub_Destroy_Nebos0A93: end_custom_thread:sub_Destroy_Nebosif03CA:   object [email protected] existsthen    0108: destroy_object [email protected]

while true in low level:

{$CLEO .cs}//-------------MAIN---------------const    EXTRASUNNY_LA = 0    SUNNY_LA = 1    EXTRASUNNY_SMOG_LA = 2    SUNNY_SMOG_LA = 3    CLOUDY_LA = 4    SUNNY_SF = 5    EXTRASUNNY_SF = 6    CLOUDY_SF = 7    RAINY_SF = 8    FOGGY_SF = 9    SUNNY_VEGAS = 10    EXTRASUNNY_VEGAS (heat waves) = 11    CLOUDY_VEGAS = 12    EXTRASUNNY_COUNTRYSIDE = 13    SUNNY_COUNTRYSIDE = 14    CLOUDY_COUNTRYSIDE = 15    RAINY_COUNTRYSIDE = 16    EXTRASUNNY_DESERT = 17end00D6: if8248:   not model #GRAFFITI_LAN01 available004D: jump_if_false @Model_Secondary0247: load_model #GRAFFITI_LAN01:Model_Secondary00D6: if8248:   not model #BDUPS_GRAF available004D: jump_if_false @Model_your10247: load_model #BDUPS_GRAF:Model_your100D6: if8248:   not model #VEGSTADPLANTS1 available004D: jump_if_false @Start0247: load_model #VEGSTADPLANTS1:Start0001: wait 0 ms // because there are jump that would loop back to start.00D6: if0256:   player $PLAYER_CHAR defined004D: jump_if_false @Loop068D: get_camera_position_to [email protected] [email protected] [email protected]: [email protected] = read_memory 0xB6F248 size 4 virtual_protect 0 // X Angle view0A8D: [email protected] = read_memory 0xC81320 size 4 virtual_protect 0 // Current weather00D6: if or8038:   not  $Active_Interior == 00039:   [email protected] == CLOUDY_LA0039:   [email protected] == CLOUDY_SF0039:   [email protected] == FOGGY_SF0039:   [email protected] == CLOUDY_VEGAS0039:   [email protected] == CLOUDY_COUNTRYSIDE0033:   -1.0 >= [email protected]: jump_if_false @Noname_C70050: gosub @sub_Destroy_Nebos0002: jump @Loop:Noname_C700BF: [email protected] = current_time_hours, [email protected] = current_time_minutes00D6: if and0028:   [email protected] >= 5001A:   20 > [email protected]: jump_if_false @Noname_F70006: [email protected] = #GRAFFITI_LAN010002: jump @Noname_FF:Noname_F70006: [email protected] = #BDUPS_GRAF:Noname_FF00D6: if or0039:   [email protected] == RAINY_SF0039:   [email protected] == RAINY_COUNTRYSIDE004D: jump_if_false @Noname_1200006: [email protected] = #VEGSTADPLANTS1:Noname_12000D6: if or8039:   not  [email protected] == [email protected]:   not object [email protected] exists004D: jump_if_false @Noname_15D0050: gosub @sub_Destroy_Nebos0249: release_model [email protected]: [email protected] = create_object [email protected] at [email protected] [email protected] [email protected]: [email protected] = [email protected] // (int):Noname_15D01BC: put_object [email protected] at [email protected] [email protected] [email protected]:Loop0002: jump @Start:sub_Destroy_Nebos00D6: if03CA:   object [email protected] exists004D: jump_if_false @retn0108: destroy_object [email protected]:retn0051: return

take two as example comparison.

 

edit: cmiiw.

Edited by X-Falcon
  • Like 2

Share this post


Link to post
Share on other sites
FreezIn

Wow, how long did it take you to do all that X - Falcon? You just pretty much saved my butt here. So lets say if for some reason, I want to add another model to represent a different weather. I could just simply make it load the 3rd model, and just add another if conditional to check if the weather is == to my desired weather?

 

Btw, what does this line mean?

0033:   -1.0 >= [email protected]

I never really understand what it does when the value gets switched around from the variable because it looked awkward lol.

 

Could I also get your Skype, just in case i have any other questions? :D

 

And that's pretty much it for this thread. Thank you to all who has helped me with this rough start of cleo.

Share this post


Link to post
Share on other sites
FreezIn

Nevermind, figured everything out, thanks to everyone who has helped me, this thread can now be locked!

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.