Jump to content

hey any genius can get the the fix i want?


caydn

Recommended Posts

can anyone please make changes in this code? this code spam w for us when we press w on bicycle. we just need to hold w no need to spam and it make the bicycle drive fast. i want to shift the w key to rmb (right mouse button). so when i press rmb the cycle can sprint. this is not my code and i dont want to steal it, i just want to make changes for my use.

 

 

the code:

 

 

{$CLEO .cs}

0000: NOP

wait 10000

while true
wait 0

if or
00DD:   actor $PLAYER_ACTOR driving_car_with_model 581 // BF-400
00DD:   actor $PLAYER_ACTOR driving_car_with_model 462 // Faggio
00DD:   actor $PLAYER_ACTOR driving_car_with_model 521 // FCR-900
00DD:   actor $PLAYER_ACTOR driving_car_with_model 522 // NRG-500
00DD:   actor $PLAYER_ACTOR driving_car_with_model 461 // PCJ-600
00DD:   actor $PLAYER_ACTOR driving_car_with_model 448 // Pizza Boy
00DD:   actor $PLAYER_ACTOR driving_car_with_model 468 // Sanchez
00DD:   actor $PLAYER_ACTOR driving_car_with_model 586 // Wayfarer
then
    if
    0AB0: 87 // W
    then
        if
        00DF:   actor $PLAYER_ACTOR driving
        then
            03C0: 1@ = $PLAYER_ACTOR car
            if and
            00DF:   actor $PLAYER_ACTOR driving
            81F3:   car 1@ not_in_air
            THEN
                0A8C: write_memory 0xB72ED6 size 1 value 255 virtual_protect 0
                wait 30
                0A8C: write_memory 0xB72ED6 size 1 value 0 virtual_protect 0
            end
        end
    end
end

if 
00DD:   actor $PLAYER_ACTOR driving_car_with_model 463 // Freeway
then
    if
    0AB0: 87 // W
    then
        if
        00DF:   actor $PLAYER_ACTOR driving
        then
            03C0: 1@ = $PLAYER_ACTOR car
            if and
            00DF:   actor $PLAYER_ACTOR driving
            81F3:   car 1@ not_in_air
            THEN
                0A8C: write_memory 0xB72ED6 size 1 value 255 virtual_protect 0
                wait 30
                0A8C: write_memory 0xB72ED6 size 1 value 0 virtual_protect 0
            end
        end
    end
end

if or 
00DD:   actor $PLAYER_ACTOR driving_car_with_model 509 // Bike
00DD:   actor $PLAYER_ACTOR driving_car_with_model 481 // BMX
00DD:   actor $PLAYER_ACTOR driving_car_with_model 510 // Mountain Bike
then
    if
    0AB0: 87 // W
    then
        if
        00DF:   actor $PLAYER_ACTOR driving
        then
            03C0: 1@ = $PLAYER_ACTOR car
            if and
            00DF:   actor $PLAYER_ACTOR driving
            81F3:   car 1@ not_in_air
            THEN
                0A8C: write_memory 0xB72D76 size 1 value 255 virtual_protect 0
                wait 30
                0A8C: write_memory 0xB72D76 size 1 value 0 virtual_protect 0
            end
        end
    end
end

end

Link to comment
Share on other sites

here

 

{$Cleo .cs} 
wait  500        
while true
wait  0
call  @Do 3 _Actor $PLAYER_ACTOR _VehModel 509 _Keypress 2 

call  @Do 3 _Actor $PLAYER_ACTOR _VehModel 481 _Keypress 2

call  @Do 3 _Actor $PLAYER_ACTOR _VehModel 510 _Keypress 2
end        
                       
:Do        
if    00DF: actor 0@ driving
then  03C0: 0@ == 0@ car
if    and
0AB0: key_pressed 2@
0137: car 0@ model == 1@
81F3: car 0@ not_in_air
then  0A8D: 2@ = read_ 0xB72D76 size true vp false
if    2@ <> 255
then  0A8C: write_memory 0xB72D76 size true value 0xFF vp false
else  0A8C: write_memory 0xB72D76 size true value false vp false
end
end
end
ret false

Link to comment
Share on other sites

how do i save this code and make a cleo file?
 

2 hours ago, Strs said:

here

 

{$Cleo .cs} 
wait  500        
while true
wait  0
call  @Do 3 _Actor $PLAYER_ACTOR _VehModel 509 _Keypress 2 

call  @Do 3 _Actor $PLAYER_ACTOR _VehModel 481 _Keypress 2

call  @Do 3 _Actor $PLAYER_ACTOR _VehModel 510 _Keypress 2
end        
                       
:Do        
if    00DF: actor 0@ driving
then  03C0: 0@ == 0@ car
if    and
0AB0: key_pressed 2@
0137: car 0@ model == 1@
81F3: car 0@ not_in_air
then  0A8D: 2@ = read_ 0xB72D76 size true vp false
if    2@ <> 255
then  0A8C: write_memory 0xB72D76 size true value 0xFF vp false
else  0A8C: write_memory 0xB72D76 size true value false vp false
end
end
end
ret false

thank sir i will try it but for that how do i save this script in a cleo file with .cs to run it in gta sa

 

Link to comment
Share on other sites

"bro i really appreciate your efforts for me. but this is not working. i press the rmb but the cycle drive like normal until i spam it my self. if possible please make it so even if i hold the rmb, the cycle will sprint. "
you mean you want only right mouse button press to move cycle ? no W ?
Link to comment
Share on other sites

18 minutes ago, Strs said:
"bro i really appreciate your efforts for me. but this is not working. i press the rmb but the cycle drive like normal until i spam it my self. if possible please make it so even if i hold the rmb, the cycle will sprint. "
you mean you want only right mouse button press to move cycle ? no W ?

with w the bike should drive nomrally until i spam w by myself. with the rmb the cycle should sprint only when i press it and i must not need to spam the rmb.

Link to comment
Share on other sites

 

That's the problem when a n00b comes to the coding forum with a request
He don't know what the code really do and tells any sh*t
Then somebody spend time to write a script
And then the n00b says "oh no, i need it in another way"

 

@caydn: The script that you've posted was written in a bad way

 

Anyway, it contains two different memory manipulations:

 

1. 
write_memory 12004726 size 1 value 255

let CJ lean forward

 

2. 
write_memory 12005078 size 1 value 255

accellerate

 

The script from Strs let CJ lean forward on bicycles only (mtb, bike, bmx)


Please give usefull informations when you post next time
(consider that it will be your last chance)

 

Which key should be pressed in which way to apply which function?

 

- should the key pressed only once for short time?
- or does it need to hold the key ?
- what should happen when leaving key?
- or does it need to patter (fast repeating key press) the key?

 

2 possible functions
- lean forward
- accelerate

 

how should the function be disabled when it's enabled?

 

for which vehicles should which function work?

 

 

 

 

On 9/21/2023 at 12:32 AM, caydn said:

this code spam w for us when we press w on bicycle.

what means "spam w for us"?
https://en.wikipedia.org/wiki/Glossary_of_video_game_terms#Spamming
is spam a new expression for pattering the key? (fast repeating key press)

 

 

 

 

 

Spoiler

I wrote one more version

works on all bicyles and all motorbikes

rmb to accelerate

mmb to lean forward

{$CLEO .cs}
thread 'BICYCLJ'

const
_KEY_1 = 1@
_KEY_2 = 2@ 
end

_KEY_1 = 2// Right Mouse Button
_KEY_2 = 4//  middle mouse button 

while true
    wait 0
    if 
        0256:   player $PLAYER_CHAR defined
    then
        if
            047A:   actor $PLAYER_ACTOR driving_bike
        then
            03C0: 0@ = actor $PLAYER_ACTOR car
            
            while 0256:   player $PLAYER_CHAR defined
                wait 0
                if
                    00DF:   actor $PLAYER_ACTOR driving
                then
                    if and
                        0AB0:   is_key_pressed _KEY_1
                        81F3:   not car 0@ in_air
                    then
                        gosub @SPEEDUP
                        repeat
                            wait 0
                        until 8AB0: not  is_key_pressed _KEY_1
                    end
                    if and
                        0AB0:   is_key_pressed _KEY_2
                        81F3:   not car 0@ in_air
                    then
                        gosub @STANDUP
                        repeat
                            wait 0
                        until 8AB0: not  is_key_pressed _KEY_2
                    end                    
                else
                    break    
                end                
            end
            // restore mem adress when $PLAYER_ACTOR leave bike
            0A8C: write_memory 12005078 size 1 value 0 virtual_protect 0
            0A8C: write_memory 12004726 size 1 value 0 virtual_protect 0
        end
    end
end
////////////////////////////////////////////////////

:SPEEDUP
0A8D: 3@ = read_memory 12005078 size 1 virtual_protect 0 
if
    8039:   not  3@ == 255 
then 
    0A8C: write_memory 12005078 size 1 value 255 virtual_protect 0    
else
    0A8C: write_memory 12005078 size 1 value 0 virtual_protect 0
end
return
////////////////////////////////////////////////////

:STANDUP
0A8D: 3@ = read_memory 12004726 size 1 virtual_protect 0 
if
    8039:   not  3@ == 255 
then 
    0A8C: write_memory 12004726 size 1 value 255 virtual_protect 0    
else
    0A8C: write_memory 12004726 size 1 value 0 virtual_protect 0
end
return

 

 

 

Link to comment
Share on other sites

3 hours ago, ZAZ said:

 

That's the problem when a n00b comes to the coding forum with a request
He don't know what the code really do and tells any sh*t
Then somebody spend time to write a script
And then the n00b says "oh no, i need it in another way"

 

@caydn: The script that you've posted was written in a bad way

 

Anyway, it contains two different memory manipulations:

 

1. 
write_memory 12004726 size 1 value 255

let CJ lean forward

 

2. 
write_memory 12005078 size 1 value 255

accellerate

 

The script from Strs let CJ lean forward on bicycles only (mtb, bike, bmx)


Please give usefull informations when you post next time
(consider that it will be your last chance)

 

Which key should be pressed in which way to apply which function?

 

- should the key pressed only once for short time?
- or does it need to hold the key ?
- what should happen when leaving key?
- or does it need to patter (fast repeating key press) the key?

 

2 possible functions
- lean forward
- accelerate

 

how should the function be disabled when it's enabled?

 

for which vehicles should which function work?

 

 

 

 

what means "spam w for us"?
https://en.wikipedia.org/wiki/Glossary_of_video_game_terms#Spamming
is spam a new expression for pattering the key? (fast repeating key press)

 

 

 

 

 

  Reveal hidden contents

I wrote one more version

works on all bicyles and all motorbikes

rmb to accelerate

mmb to lean forward

{$CLEO .cs}
thread 'BICYCLJ'

const
_KEY_1 = 1@
_KEY_2 = 2@ 
end

_KEY_1 = 2// Right Mouse Button
_KEY_2 = 4//  middle mouse button 

while true
    wait 0
    if 
        0256:   player $PLAYER_CHAR defined
    then
        if
            047A:   actor $PLAYER_ACTOR driving_bike
        then
            03C0: 0@ = actor $PLAYER_ACTOR car
            
            while 0256:   player $PLAYER_CHAR defined
                wait 0
                if
                    00DF:   actor $PLAYER_ACTOR driving
                then
                    if and
                        0AB0:   is_key_pressed _KEY_1
                        81F3:   not car 0@ in_air
                    then
                        gosub @SPEEDUP
                        repeat
                            wait 0
                        until 8AB0: not  is_key_pressed _KEY_1
                    end
                    if and
                        0AB0:   is_key_pressed _KEY_2
                        81F3:   not car 0@ in_air
                    then
                        gosub @STANDUP
                        repeat
                            wait 0
                        until 8AB0: not  is_key_pressed _KEY_2
                    end                    
                else
                    break    
                end                
            end
            // restore mem adress when $PLAYER_ACTOR leave bike
            0A8C: write_memory 12005078 size 1 value 0 virtual_protect 0
            0A8C: write_memory 12004726 size 1 value 0 virtual_protect 0
        end
    end
end
////////////////////////////////////////////////////

:SPEEDUP
0A8D: 3@ = read_memory 12005078 size 1 virtual_protect 0 
if
    8039:   not  3@ == 255 
then 
    0A8C: write_memory 12005078 size 1 value 255 virtual_protect 0    
else
    0A8C: write_memory 12005078 size 1 value 0 virtual_protect 0
end
return
////////////////////////////////////////////////////

:STANDUP
0A8D: 3@ = read_memory 12004726 size 1 virtual_protect 0 
if
    8039:   not  3@ == 255 
then 
    0A8C: write_memory 12004726 size 1 value 255 virtual_protect 0    
else
    0A8C: write_memory 12004726 size 1 value 0 virtual_protect 0
end
return

 

 

 

sorry i do not understand many coding terms. see this video- 

 

 

In gta san andreas samp servers, if we want to increase the speed of bycycle or mtb(mountain bike specifically) we need to spam the key W very fast to make the mtb run faster. If we the press the W and keep it holding, then the mtb will run at normal speed. so what i did was i set the in game control as my rmb to accelerate the bike. But here also to make the bike speed up with rmb i need to spam the right mouse button. so in the script provided above, with using that i do not need to spam the key W to make the bycycle go faster and just hold the W key and the mod do it for us. so i jus wanted a smart guy to edit that script in a way that if i press rmb, the cycle will go faster and i do not need to manually spam it multiple times to make the bike go faster.

 

 

also the lean forward while i press w is only requiered for motobike which is working perfectly and does not need modifications. or if you can then just shift it to the rmb. to summarize i would say for motor bike like nrg,fcr etc shift the leaning thing to rmb while i accelerate and for bycycles make it go faster with without me need to spam rmb. i have already set the rmb as accelerator. 

Link to comment
Share on other sites

18 minutes ago, caydn said:

(...) In gta san andreas samp servers(...)

SAMP servers in many case limits usage of scripts.

Are you asking us to develop "hacks" for you?

Link to comment
Share on other sites

25 minutes ago, MiranDMC said:

SAMP servers in many case limits usage of scripts.

Are you asking us to develop "hacks" for you?

no no this is not hack and the server i play on allows it. i only want to make my cycle go faster with rmb without the need to spam rmb. i explained all on the top. or if anyone of you can make a cleo mod to make bycycle jump with lmb (left mouse button ) that can also work. i need any one of these mods.

Link to comment
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
  • 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.