Resource icon

Untagged Release No Fuel

Status
Not open for further replies.

blvck0v

Active member
Joined
Feb 23, 2019
Messages
97
Reaction score
51
Location
ugbase.eu
Info: Drive w/o fuel. Useful to bypass RP servers fuel systems.

Trigger on/off: FUEL as cheatcode (default is active)

PHP:
{$CLEO}
{$USE ini}
0000: NOP

wait 8500

if 0AAB: does_file_exist "CLEO\NoFuel.ini"
then 0AF0: 31@ = read_int_from_ini_file "CLEO\NoFuel.ini" section "NoFuel" key "status"
else
    0AF1: write_int 1 to_ini_file "CLEO\NoFuel.ini" section "NoFuel" key "status"
    0AF0: 31@ = read_int_from_ini_file "CLEO\NoFuel.ini" section "NoFuel" key "status"    
end

while true
wait 0

    if 0ADC: test_cheat "FUEL"
    then
        if 31@ == 0
        then
            31@ = 1
            0AF1: write_int 1 to_ini_file "CLEO\NoFuel.ini" section "NoFuel" key "status"
            0ACD: show_text_highpriority "nofuel on" time 1000
        else
            31@ = 0
            0AF1: write_int 0 to_ini_file "CLEO\NoFuel.ini" section "NoFuel" key "status"
            0ACD: show_text_highpriority "nofuel off" time 1000
        end
    end
 
    if 31@ == 1
    then
        if Actor.Driving($PLAYER_ACTOR)
        then
            0@ = Actor.CurrentCar($PLAYER_ACTOR)
            046C: 1@ = car 0@ driver
            if 003A: 1@ == $PLAYER_ACTOR // (int)
            then
                0918: set_car 0@ engine_operation 1
            end
        end
    end
 
end
 

Attachments

  • NoFuel.cs
    18.7 KB · Views: 260
Last edited:

Kross

Active member
Joined
Dec 15, 2021
Messages
149
Reaction score
42
Automatic Version

PHP:
{$CLEO}
0000: NOP
0662: printstring "No Fuel"

while true
wait 0
        if Actor.Driving($PLAYER_ACTOR)
        then
            0@ = Actor.CurrentCar($PLAYER_ACTOR)
            046C: 1@ = car 0@ driver
            if 003A: 1@ == $PLAYER_ACTOR // (int)
            then
                0918: set_car 0@ engine_operation 1
            end
        end
    end
end_thread
 

Attachments

  • NoFuel.cs
    17.6 KB · Views: 83

blvck0v

Active member
Joined
Feb 23, 2019
Messages
97
Reaction score
51
Location
ugbase.eu
BUMP - no fuel will now always stay on or off even after game restart.
 

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
268
Location
Pluto
I prefer Normal Cheat Activation without any SAMPFUNCS Opcodes.
  1. Works on Single Player.
  2. Works on Any SAMP Version.
 

blvck0v

Active member
Joined
Feb 23, 2019
Messages
97
Reaction score
51
Location
ugbase.eu
I prefer Normal Cheat Activation without any SAMPFUNCS Opcodes.
  1. Works on Single Player.
  2. Works on Any SAMP Version.
Tell me more about that, I think for single after the ini isi made, it can manualy be changed to be active. Also single doesn't really need engine forced to on.
For activation you refer to 0ADC: test cheat opcode? And also please tell me what part can cause incompatibilities depending on samp version.
Thanks!
 

Kross

Active member
Joined
Dec 15, 2021
Messages
149
Reaction score
42
Tell me more about that, I think for single after the ini isi made, it can manualy be changed to be active. Also single doesn't really need engine forced to on.
For activation you refer to 0ADC: test cheat opcode? And also please tell me what part can cause incompatibilities depending on samp version.
Thanks!
It's not a question of incompatibility, it's a question of being a mod that works without needing SAMPFUNCS(until samp.Available() and 0B34: samp register_client_command for example)
 

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
268
Location
Pluto
Tell me more about that, I think for single after the ini isi made, it can manualy be changed to be active. Also single doesn't really need engine forced to on.
For activation you refer to 0ADC: test cheat opcode? And also please tell me what part can cause incompatibilities depending on samp version.
Thanks!
I mean convert the whole script in a way that it doesn't need SAMP to operate.
  1. SAMPFUNCS opcodes only works for 0.3.7 R1. So players who uses other SAMP version can't use this script.
  2. Instead of CMD activation(from SAMPFUNCS), use opcode 0ADC for operation toggling. This way, you'll not rely on SAMP.
 

blvck0v

Active member
Joined
Feb 23, 2019
Messages
97
Reaction score
51
Location
ugbase.eu
It's not a question of incompatibility, it's a question of being a mod that works without needing SAMPFUNCS(until samp.Available() and 0B34: samp register_client_command for example)
Thanks.
I mean convert the whole script in a way that it doesn't need SAMP to operate.
  1. SAMPFUNCS opcodes only works for 0.3.7 R1. So players who uses other SAMP version can't use this script.
  2. Instead of CMD activation(from SAMPFUNCS), use opcode 0ADC for operation toggling. This way, you'll not rely on SAMP.
I understand now. I had no clue that sampfuncs things only work for R1 so many thanks for that explanation.
I updated the script now. Please let me know if any other thing seems off with it. TY!
 

Kross

Active member
Joined
Dec 15, 2021
Messages
149
Reaction score
42
Thanks.

I understand now. I had no clue that sampfuncs things only work for R1 so many thanks for that explanation.
I updated the script now. Please let me know if any other thing seems off with it. TY!
Good work my brother, I tested it here and it worked perfectly
 

dinoid

Member
Joined
Jan 1, 2022
Messages
13
Reaction score
1
Location
Brazil
On some SAMP RP servers when the car gets to 0 fuel you're kicked from it, is there anyway to prevent this using nofuel cheat?
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
882
Location
Lithuania
That can be done through any kind of debug menu which I can get the server variables or I would need to make a new .cs mod? (Sorry if it's the wrong section)
Take memories from cleo called "mCars.cs" and use in your code.
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
882
Location
Lithuania
I used the forum tool, google and duckduckgo and didn't find. You're good with searching lol.
Thanks a lot m8!

It was "mCar.cs" not "mCars.cs" that explains a lot actually.
How Google works:
[Keywords] [website]

Example:
Mcar site:ugbase.eu
 

dinoid

Member
Joined
Jan 1, 2022
Messages
13
Reaction score
1
Location
Brazil
I were able to make it work, but can't seem to disable it.
Here is the code snippet:
Code:
if 0ADC: test_cheat "FUEL"
    then
        if 31@ == 0
        then
            31@ = 1
            0AF1: write_int 1 to_ini_file "CLEO\NoFuel.ini" section "NoFuel" key "status"
            0ACD: show_text_highpriority "nofuel on" time 1000
            SAMP.ReadSAMPMemory(33@,0x146E0,2)
            SAMP.WriteSAMPMemory(0x146E0,0xC390,2) 
        else
            31@ = 0
            0AF1: write_int 0 to_ini_file "CLEO\NoFuel.ini" section "NoFuel" key "status"
            0ACD: show_text_highpriority "nofuel off" time 1000
            SAMP.WriteSAMPMemory(0x146E0,33@,2) 
        end  
    end

Game crashes when I try to disable. SAMP 0.3.7

My guess is that I used 33@ as a dumbf***k. 32 and 33 are for timers lul
Not sure how I can create a variable in order to store the old memvalue of 0x146E0
 
Last edited:
Status
Not open for further replies.
Top