CLEO Help help with coding

CLEO related
Status
Not open for further replies.

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
hello, i got problem with coding this is my code
--------------------------------------------------------------------------------------
{$VERSION 3.1.0027}
{$CLEO .cs}

thread 'HEALTH'

:HEALTH_01
wait 0
if
0AB0: key_pressed 66
0851: set_actor $PLAYER_ACTOR decrease_health_by 10 affect_armour 1
jump @HEALTH_01
------------------------------------------------------------------------------------------
but i need to change the decrease to increase health !
but even if i change it my health decrease when i active the cheat
so i dont know how , can you fix my code ,,
what is the code?
well i need my health to increased by a count like 10 or 30 (to be hard on admin to catch me) when i pressed B

thx
 

Protential

Active member
Joined
Jun 8, 2013
Messages
61
Reaction score
0
Code:
{$VERSION 3.1.0027}
{$CLEO .cs}

thread 'HEALTH'

:HEALTH_01
0@ =- 10 
wait 0
if
0ADC: test_cheat "B"
//0AB0: key_pressed 66
jf @HEALTH_01
0851: set_actor $PLAYER_ACTOR decrease_health_by 0@ flag 0  
jump @HEALTH_01
This'll add 10 health every time you tap B.
 

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
Code:
{$VERSION 3.1.0027}
{$CLEO .cs}

thread 'HEALTH'

:HEALTH_01
0@ =- 10 
wait 0
if
0ADC: test_cheat "B"
//0AB0: key_pressed 66
jf @HEALTH_01
0851: set_actor $PLAYER_ACTOR decrease_health_by 0@ flag 0  
jump @HEALTH_01
This'll add 10 health every time you tap B.

thanks but can you tell me what changed and what 0@ mean and flag0 too please ?
 

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
forgot to ask how to efect on some player like when i put this opcode 0003: shake_camera 40
my camera get shake , but how i can effect on another player , or make some object on him $SECOND_PLAYER/ACTOR dont wrok :( :(:( , so how to effect on another player not just me like set another player that i selected bleeding not me but him . thx
 

Protential

Active member
Joined
Jun 8, 2013
Messages
61
Reaction score
0
[quote author="Protential"]
Code:
{$VERSION 3.1.0027}
{$CLEO .cs}

thread 'HEALTH'

:HEALTH_01
0@ =- 10 
wait 0
if
0ADC: test_cheat "B"
//0AB0: key_pressed 66
jf @HEALTH_01
0851: set_actor $PLAYER_ACTOR decrease_health_by 0@ flag 0  
jump @HEALTH_01
This'll add 10 health every time you tap B.

thanks but can you tell me what changed and what 0@ mean and flag0 too please ?[/quote]
0@ is a variable, I defined the variable with -10, now that I look at it I'm not sure if it even needed a variable and you probably could've just done "0851: set_actor $PLAYER_ACTOR decrease_health_by -10 flag 0" instead, now the reasoning behind making it a negative is that the opcode deducts health, placing a positive would decrease it whereas placing a negative does the opposite.
About flag 0, I'm not sure, you could probably change it back and it'll have no effect.
forgot to ask how to efect on some player like when i put this opcode 0003: shake_camera 40
my camera get shake , but how i can effect on another player , or make some object on him $SECOND_PLAYER/ACTOR dont wrok :( :(:( , so how to effect on another player not just me like set another player that i selected bleeding not me but him . thx
That wouldn't be possible, sannybuilder/cleo etc was created for gta sa, everything you do in it is has a client sided effect.
 

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
wow thx good info ,, but can i create object like a box ? and i climbed on it
cuz in zombie server we build boxes so i thinking to make program for that , but is it possible?
and is there addresses like addresses for money and health or no need to use addresses cuz sunny built for programing for sa not like c++ so no need?
 

Protential

Active member
Joined
Jun 8, 2013
Messages
61
Reaction score
0
wow thx good info ,, but can i create object like a box ? and i climbed on it
cuz in zombie server we build boxes so i thinking to make program for that , but is it possible?
and is there addresses like addresses for money and health or no need to use addresses cuz sunny built for programing for sa not like c++ so no need?
I'm pretty sure Sannybuilder can utilize memory editting, but not as good C++, so yes I believe addresses can be used.
Also when you create that box, only you'll see if and on other players screen you'll be floating, making you vulnerable to being banned for fly hacking.
 

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
[quote author="blackHat"]wow thx good info ,, but can i create object like a box ? and i climbed on it
cuz in zombie server we build boxes so i thinking to make program for that , but is it possible?
and is there addresses like addresses for money and health or no need to use addresses cuz sunny built for programing for sa not like c++ so no need?
I'm pretty sure Sannybuilder can utilize memory editting, but not as good C++, so yes I believe addresses can be used.
Also when you create that box, only you'll see if and on other players screen you'll be floating, making you vulnerable to being banned for fly hacking.[/quote]
hmmm your right :p :p:p
but i think Cleo is limited for single player :( :(:( we cant effect too much on samp with our codes
 
Status
Not open for further replies.
Top