CLEO Help [CLEO HELP] How create?

CLEO related
Status
Not open for further replies.

Parazitas

God
Joined
Jan 2, 2017
Messages
3,121
Solutions
5
Reaction score
882
Location
Lithuania
Hi world.

1.​
How to create engine cheker?.
If car engine is off then samp say_msg  " /variklis "


2.
How to create auto deactive?.
I mean if samp chat open then cheat auto deactivate.
http://i.imgur.com/HhS48RZ.png
Then samp chat close cheat activate.

3.
How to create player weather cheker?.
If player weather bad then samp say_msg " /giedra "

 
Joined
Dec 31, 2015
Messages
712
Reaction score
27
1. Not sure if there's any opcode related to the engine check, however I always used to work with memory because it's kinda easier for me
May be wrong with 8 and 24 value, because this (https://www.gtamodding.com/wiki/Memory_Addresses_(SA)) says it's should be 0 and 16, but it was 8 and 24 for me (24 means engine is toggled on)
I also have a feeling that this code looks ugly so maybe others will offer something better
Adapt this code yourself, this is only a snippet, add checks and all that shiet
Code:
while true
wait 0

if 0AB1: @engine_check 0 
then
//smth
end

end

:engine_check
0A8D: 0@ = read_memory 0xBA18FC size 4 virtual_protect 0  //current vehicle pointer
if 0@ > 0
then
    0@ += 0x428
    0A8D: 0@ = read_memory 0@ size 1 virtual_protect 0  //engine state
    if 0@ == 8
    then
        0485:  return_true
        ret 0
    end
    059A:  return_false
    ret 0
end
059A:  return_false
ret 0


2. 
Code:
...some activation check, lets say your activation value is stored into 13@

if
0B21:	samp is_chat_opened
then

end
else
if 13@ == 1
then
//your cheat
end
end
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,121
Solutions
5
Reaction score
882
Location
Lithuania
supahdupahnubah said:
1. Not sure if there's any opcode related to the engine check, however I always used to work with memory because it's kinda easier for me
May be wrong with 8 and 24 value, because this (https://www.gtamodding.com/wiki/Memory_Addresses_(SA)) says it's should be 0 and 16, but it was 8 and 24 for me (24 means engine is toggled on)
I also have a feeling that this code looks ugly so maybe others will offer something better
Adapt this code yourself, this is only a snippet, add checks and all that shiet
Code:
while true
wait 0

if 0AB1: @engine_check 0 
then
//smth
end

end

:engine_check
0A8D: 0@ = read_memory 0xBA18FC size 4 virtual_protect 0  //current vehicle pointer
if 0@ > 0
then
    0@ += 0x428
    0A8D: 0@ = read_memory 0@ size 1 virtual_protect 0  //engine state
    if 0@ == 8
    then
        0485:  return_true
        ret 0
    end
    059A:  return_false
    ret 0
end
059A:  return_false
ret 0


2. 
Code:
...some activation check, lets say your activation value is stored into 13@

if
0B21:	samp is_chat_opened
then

end
else
if 13@ == 1
then
//your cheat
end
end

So, how  for about number 3?
 

mistery

Well-known member
Joined
Apr 23, 2014
Messages
262
Reaction score
5
psst boy...


yes you

come closer

closer

CLOSER

good

do you wanna make a DEAL???

no,wait,don't leave

wait no

NOOO WAIT, DO NOT LEAVE

AAAAAARARGGGGHHHFFHHF

sry bored m9 no h9 ples
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,121
Solutions
5
Reaction score
882
Location
Lithuania
supahdupahnubah said:
Don't know about that

Does not work or I'm doing something wrong.

Code:
{$CLEO .cs}

//-------------MAIN---------------
thread 'AutoVariklis' 

while true
wait 0

if 0AB1: @engine_check 0
then
0AF9: samp say_msg "/variklis"
end

end

:engine_check
0A8D: 0@ = read_memory 0xBA18FC size 4 virtual_protect 0  //current vehicle pointer
if 0@ > 0
then
    0@ += 0x428
    0A8D: 0@ = read_memory 0@ size 1 virtual_protect 0  //engine state
    if 0@ == 8
    then
        0485:  return_true
        ret 0
    end
    059A:  return_false
    ret 0
end
059A:  return_false
ret 0


P.S. understand, how detect button "Taip"

3. Maybe possible detect if are not 01B6: set_weather 1 then just set: 01B6: set_weather 1
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,121
Solutions
5
Reaction score
882
Location
Lithuania
supahdupahnubah said:
It is works for me :imoverit:
Maybe others can tell something more

Parazitas said:
P.S.        understand, how detect button "Taip"

?

I mean this, how detect button "Taip"
http://i.imgur.com/Q0LNVcR.png
HOW DETECT ?
http://ugbase.eu/Thread-Help-with-cleo--16904?pid=99517#pid99517
 
Joined
Dec 31, 2015
Messages
712
Reaction score
27
Parazitas said:
I mean this, how detect button "Taip"
http://i.imgur.com/Q0LNVcR.png
HOW DETECT ?
http://ugbase.eu/Thread-Help-with-cleo--16904?pid=99517#pid99517

I've tried to register on your server but was so tired and ill so I dropped it, would be cool if you could register me an account there so I can try to look at it
 

Edvincik

Well-known member
Joined
Mar 15, 2016
Messages
399
Reaction score
26
supahdupahnubah said:
Parazitas said:
I mean this, how detect button "Taip"
http://i.imgur.com/Q0LNVcR.png
HOW DETECT ?
http://ugbase.eu/Thread-Help-with-cleo--16904?pid=99517#pid99517

I've tried to register on your server but was so tired and ill so I dropped it, would be cool if you could register me an account there so I can try to look at it
Drop your email here i will register you
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,121
Solutions
5
Reaction score
882
Location
Lithuania
supahdupahnubah said:
Parazitas said:
I mean this, how detect button "Taip"
http://i.imgur.com/Q0LNVcR.png
HOW DETECT ?
http://ugbase.eu/Thread-Help-with-cleo--16904?pid=99517#pid99517

I've tried to register on your server but was so tired and ill so I dropped it, would be cool if you could register me an account there so I can try to look at it

I create for u acc and send to PM.
 

not490

Well-known member
Joined
Feb 8, 2014
Messages
438
Reaction score
4
3.
How to create player weather cheker?.
If player weather bad then samp say_msg " /giedra

Weather checker? What you actually mean? An cleo that checks what weather is it now? I mean, you can actually see it by your own eyes man
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,121
Solutions
5
Reaction score
882
Location
Lithuania
not490 said:
3.
How to create player weather cheker?.
If player weather bad then samp say_msg " /giedra

Weather checker? What you actually mean? An cleo that checks what weather is it now? I mean, you can actually see it by your own eyes man

I mean if server set weather to bad then cleo set to good.
 
Status
Not open for further replies.
Top