0% found this document useful (0 votes)
85 views5 pages

Cnitro

This script summarizes a vehicle nitrous oxide (nitro) script in Grand Theft Auto: 1. It checks if the player is in a drivable vehicle and activates nitro if available. 2. It decreases the nitro level over time when active and displays the available nitro level. 3. It allows the player to boost the nitro level by pressing keys and draws a box indicator of the current nitro level.

Uploaded by

Naitik Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views5 pages

Cnitro

This script summarizes a vehicle nitrous oxide (nitro) script in Grand Theft Auto: 1. It checks if the player is in a drivable vehicle and activates nitro if available. 2. It decreases the nitro level over time when active and displays the available nitro level. 3. It allows the player to boost the nitro level by pressing keys and draws a box indicator of the current nitro level.

Uploaded by

Naitik Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 5

{$CLEO .

cs}

thread 'CNITRO'
//0ADF: add_dynamic_GXT_entry "ELNITRO" text "NOS Available: ~1~. Nitro status:
~1~" // Debug
4@ = 1.0
0087: 21@ = 4@ // (float)
21@ *= 1000.0
0092: 22@ = float 21@ to_integer

:CNITRO
wait 0
if
Player.Defined($PLAYER_CHAR)
jf @CNITRO
if
Player.Controllable($PLAYER_CHAR)
jf @CNITRO
if and
Actor.Driving($PLAYER_ACTOR)
//84C8: not actor $PLAYER_ACTOR driving_flying_vehicle
847A: not actor $PLAYER_ACTOR driving_bike
84A7: not actor $PLAYER_ACTOR driving_boat
89AE: not actor $PLAYER_ACTOR driving_train
jf @CNITRO
//03E5: show_text_box 'CHEAT1' // Cheat activated
03C0: 0@ = actor $PLAYER_ACTOR car
0A97: 1@ = car 0@ struct
1@ += 0x48A
0A8D: 3@ = read_memory 1@ size 1 virtual_protect 0
if
3@ > 0 // if car has nitro
jf @CNITRO
0A97: 1@ = car 0@ struct
1@ += 4
0A8D: 12@ = read_memory 1@ size 1 virtual_protect 0
if
88B7: not test 12@ bit 1
jf @CNITRO_read
4@ = 1.0
08BD: set 12@ bit 1
0A8C: write_memory 1@ size 1 value 12@ virtual_protect 0
jump @CNITRO_2

:CNITRO_read
0A97: 1@ = car 0@ struct
1@ += 5
0A8D: 4@ = read_memory 1@ size 4 virtual_protect 0
/*if
4@ == 0.0
then
4@ = 1.0
end*/

:CNITRO_2
wait 1
if or
Actor.Dead($PLAYER_ACTOR)
Car.Wrecked(0@)
jf @CNITRO_3_A
03F0: enable_text_draw 0
08C3: clear 12@ bit 1
4@ = 1.0
jump @CNITRO

:CNITRO_3_A
0A97: 1@ = car 0@ struct
1@ += 5
0A8C: write_memory 1@ size 4 value 4@ virtual_protect 0
if
not Actor.InCar($PLAYER_ACTOR, 0@)
jf @CNITRO_3
08C3: clear 12@ bit 1
jump @CNITRO

:CNITRO_3
0A97: 1@ = car 0@ struct
1@ += 0x8A4
0A8D: 2@ = read_memory 1@ size 4 virtual_protect 0
0A97: 1@ = car 0@ struct
1@ += 0x48A
0A8D: 3@ = read_memory 1@ size 1 virtual_protect 0
if
3@ == 0
then
08C3: clear 12@ bit 1
4@ = 1.0
0A97: 1@ = car 0@ struct
1@ += 5
0A8C: write_memory 1@ size 4 value 4@ virtual_protect 0
jump @CNITRO
end
if or
0AB0: key_pressed 16 // shift
00E1: player 0 pressed_key 4 // Ctrl
then
02E3: 26@ = car 0@ speed
if
26@ > 0.1
then
if
2@ == 1.0
then
if
0045: 2@ == 4@ // (float)
then
2@ = -0.001
else
0087: 2@ = 4@ // (float)
2@ -= 0.001
end
else
2@ -= 0.001
end
0087: 4@ = 2@ // (float)
0A97: 1@ = car 0@ struct
1@ += 5
0A8C: write_memory 1@ size 4 value 4@ virtual_protect 0
0087: 21@ = 4@ // (float)
21@ *= 1000.0
0092: 22@ = float 21@ to_integer
//045A: draw_text_1number 320.0 155.333 GXT 'NUMBER' number 22@ // ~1~
if
-0.999 >= 2@
then
if
3@ > 1
then
3@ -= 1
0A97: 1@ = car 0@ struct
1@ += 0x48A
0A8C: write_memory 1@ size 1 value 3@ virtual_protect 0
else
3@ = 0
0A97: 1@ = car 0@ struct
1@ += 0x48A
0A8C: write_memory 1@ size 1 value 0 virtual_protect 0
03F0: enable_text_draw 0
08C3: clear 12@ bit 1
4@ = 1.0
0A97: 1@ = car 0@ struct
1@ += 5
0A8C: write_memory 1@ size 4 value 4@ virtual_protect 0
jump @CNITRO
end
end
0A97: 1@ = car 0@ struct
1@ += 0x8A4
0A8C: write_memory 1@ size 4 value 2@ virtual_protect 0
else
0A97: 1@ = car 0@ struct
1@ += 0x8A4
0A8C: write_memory 1@ size 4 value 1.000 virtual_protect 0
/*if
08AB: external_script 66 (CARMOD1) loaded
then
0087: 25@ = 4@ // (float)
096D: get_car 0@ component_on_slot 8 model_to 24@
if or
00E1: player 0 pressed_key 6
00E1: player 0 pressed_key 16
then
if
87D6: not 24@ == $10415 // @ == $ (int)
then
0A97: 1@ = car 0@ struct
1@ += 5
4@ = 1.0
0A8C: write_memory 1@ size 4 value 4@ virtual_protect 0
end
else
0A97: 1@ = car 0@ struct
1@ += 5
0A8C: write_memory 1@ size 4 value 25@ virtual_protect 0
end
end*/
end
else
0A97: 1@ = car 0@ struct
1@ += 0x8A4
0A8C: write_memory 1@ size 4 value 1.000 virtual_protect 0
end
0A97: 1@ = car 0@ struct
1@ += 0x8A4
0A8D: 2@ = read_memory 1@ size 4 virtual_protect 0
2@ *= 1000.0
0092: 2@ = float 2@ to_integer
//02FD: show_text_2numbers_lowpriority GXT 'ELNITRO' numbers 3@ 2@ time 0 flag
1 // NOS Available: ~1~. Nitro status: ~1~*/
0A8D: 6@ = read_memory 0xA444A0 size 1 virtual_protect 0
0A8D: 7@ = read_memory 0xBA6769 size 1 virtual_protect 0
0A8D: 8@ = read_memory 0xB6F065 size 1 virtual_protect 0
if and // HUD enabled
6@ == 1
7@ == 1
8@ == 0
then
03F0: enable_text_draw 1
//045A: draw_text_1number 320.0 155.333 GXT 'NUMBER' number 22@ // ~1~
if
not fading
then
gosub @BOXES
end
end
jump @CNITRO_2

:BOXES
if
84C8: not actor $PLAYER_ACTOR driving_flying_vehicle
then
03E3: set_texture_to_be_drawn_antialiased 1
038E: draw_box_position 25.0 382.0 size 10.0 76.0 RGBA 0 0 0 96
end
0095: make 2@ absolute_integer
0093: 2@ = integer 2@ to_float
2@ /= 20.0
03E3: set_texture_to_be_drawn_antialiased 1
if
4@ == 1.0
then
038E: draw_box_position 25.0 382.0 size 10.0 76.0 RGBA 0 255 255 96
else
0087: 8@ = 4@ // (float)
8@ += 1.0
8@ *= 76.0
0087: 9@ = 8@ // (float)
9@ /= 76.0
9@ *= -38.0 // 420.0-382.0
9@ += 420.0 // min Y
038E: draw_box_position 25.0 9@ size 10.0 8@ RGBA 0 255 255 96
end

0085: 5@ = 3@ // (int)
if
not 4@ == 1.0
then
5@ -= 1
end
if
5@ >= 0
then
0349: set_text_draw_font 1
0342: set_text_draw_centered 1
0340: set_text_draw_RGBA 180 180 180 255
//033F: set_text_draw_letter_size 1.3 3.36
081C: draw_text_outline 1 RGBA 0 0 0 255
060D: draw_text_shadow 0 rgba 0 0 0 255
//0344: set_text_draw_linewidth 10.0 for_centered_text
03E3: set_texture_to_be_drawn_antialiased 1
03E0: set_text_draw_before_fade 1
045A: draw_text_1number 25.0 420.0 GXT 'NUMBER' number 5@ // ~1~
end
return

You might also like