CLEO Help [Help] Key Bind

CLEO related
Status
Not open for further replies.

ejexter

Well-known member
Joined
Feb 21, 2014
Messages
211
Reaction score
0
[glow=yellow,2,300]This is possible??[/glow]  :surprised:
{$CLEO .cs}
thread "Pa0NeiX" //

:MAIN
wait 0
if
0ADC: test_cheat "PROME1"
then
print "You typed 1" 3000
end
if
0ADC: test_cheat "PROME2"
then
print "You typed 2" 3000
end
if
0ADC: test_cheat "PROME3"
then
print "You typed 3" 3000
end
goto @main
 

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
It must work, what's the problem?

Replace :MAIN with WHILE TRUE and goto @main with END if you use that type of level.
 

ejexter

Well-known member
Joined
Feb 21, 2014
Messages
211
Reaction score
0
TH3RM4L link said:
What do you exactly want? Explain more.
This code is correct ??
{$CLEO .cs}
thread "Pa0NeiX"
0B34: samp register_client_command ".enable" to_label @Command

:LOOP
wait 0
goto @LOOP

:Command
wait 0
SAMP.CmdRet()

WHILE TRUE
wait 0
if
0ADC: test_cheat "PROME1"
then
print "You typed 1" 3000
end
if
0ADC: test_cheat "PROME2"
then
print "You typed 2" 3000
end
if
0ADC: test_cheat "PROME3"
then
print "You typed 3" 3000
end
END
 

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
No, it's not correct. With WHILE TRUE - END you start and end the LOOP, so :LOOP is not needed (or yes to jump after we activate it then after we use it, deactivate it again with 0), another thing is the command will do nothing because you put it to a label with just return your cmd, you must put something like 31@ = 1 so you activate it, check this code:

Code:
{$CLEO .cs}

thread "Pa0NeiX"

0B34: samp register_client_command ".enable" to_label @Command

31@ = 0 // check if it's deactivated

/*:LOOP
wait 0
goto @LOOP
We don't need this, we got WHILE TRUE - END 
which replace this
*/

WHILE TRUE
wait 0
if       // if activated then you can use the test_cheats
31@ == 1 // if activated then you can use the test_cheats
then     // if activated then you can use the test_cheats
if
0ADC: test_cheat "PROME1"
then
print "You typed 1" 3000
wait 1000 //wait 1 second
31@ = 0   //then deactivate it, you need to activate it again with /.enable                     
end
if
0ADC: test_cheat "PROME2"
then
print "You typed 2" 3000
wait 1000 //wait 1 second      
31@ = 0   //then deactivate it, you need to activate it again with /.enable
end
if
0ADC: test_cheat "PROME3"
then
print "You typed 3" 3000
wait 1000 //wait 1 second      
31@ = 0   //then deactivate it, you need to activate it again with /.enable
end
end     // END OF IF 31@ == 1 THEN
END

:Command
wait 0
31@ = 1 //Activate it so you can use the test_cheats
/*Also you can use this: 0B12: 31@ = 31@ XOR 1
With this you can activate and deactivate it, it will change with 31@ = 0 and 31@ = 1
*/
SAMP.CmdRet
 
Status
Not open for further replies.
Top