UG-Base Gamehacking

Full Version: Disable/Enable CLEO script on the same command?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I know, for commands I need SAMPFUNCS, I have it, MGFunc too.

So dus any1 know how to add a disable and enable for a CLEO script on the same command?
Da problem is that we can only put 1 label per command... and there are some scripts that use same cmd for deact. and act. like SR_Team's GM.

So, let GM be an example?
Code:
0B34: samp register_client_command "activation" to_label @activation

WHILE TRUE
wait 0
if [email protected] == 1
then
    0AF9: say_msg "spam spam spam"
end
END

:activation
0B12: [email protected] = [email protected] XOR 1
if [email protected] == 1
then 0AF8: "Cheat on" -1
else 0AF8: "Cheat off" -1
end
cmd_ret
(06-20-2014, 01:37 PM)springfield link Wrote: [ -> ]
Code:
0B34: samp register_client_command "activation" to_label @activation

WHILE TRUE
wait 0
if [email protected] == 1
then
    0AF9: say_msg "spam spam spam"
end
END

:activation
0B12: [email protected] = [email protected] XOR 1
if [email protected] == 1
then 0AF8: "Cheat on" -1
else 0AF8: "Cheat off" -1
end
cmd_ret
So, what exactly is the first part and what is the second one for?

First one is actual function of hack? And second part under :activation is to notify player dat hack is activated? Or other way around?

Any example of a hax?
I never actually tried doing commands... so...

And XOR is?

Thx alot
It's a simple switch command, on/off with the same key/command.
In this case you only use the command for activation only.
The first part is the main script, in a loop.
The second part(label; activation) is the toggle on/off switch that works with a command.

Using /activation once will toggle the script on([email protected] becomes 1/true) and then goes back to the first loop, with a simple check to see if script is on(if [email protected] == 1)and it will spam the chat with that message, now if you type /activation again, the script will toggle off([email protected] becomes 0/false) and return to the first loop again, but now script won't contiune because it doesn't meet the condition(if [email protected] == 1).

About XOR, http://en.wikipedia.org/wiki/Exclusive_or
Omg, this will help me a lot, thanks springfield
(06-20-2014, 03:03 PM)springfield link Wrote: [ -> ]It's a simple switch command, on/off with the same key/command.
In this case you only use the command for activation only.
The first part is the main script, in a loop.
The second part(label; activation) is the toggle on/off switch that works with a command.

Using /activation once will toggle the script on([email protected] becomes 1/true) and then goes back to the first loop, with a simple check to see if script is on(if [email protected] == 1)and it will spam the chat with that message, now if you type /activation again, the script will toggle off([email protected] becomes 0/false) and return to the first loop again, but now script won't contiune because it doesn't meet the condition(if [email protected] == 1).

About XOR, http://en.wikipedia.org/wiki/Exclusive_or

Yes, but, how2create (for exampl) a simple GM with it? With 02AB or 02AC?
Since this is for loop activation.
Do this without sampfuncs springfield?
(06-20-2014, 03:27 PM)Crokit link Wrote: [ -> ][quote author=springfield link=topic=7817.msg44657#msg44657 date=1403272988]
It's a simple switch command, on/off with the same key/command.
In this case you only use the command for activation only.
The first part is the main script, in a loop.
The second part(label; activation) is the toggle on/off switch that works with a command.

Using /activation once will toggle the script on([email protected] becomes 1/true) and then goes back to the first loop, with a simple check to see if script is on(if [email protected] == 1)and it will spam the chat with that message, now if you type /activation again, the script will toggle off([email protected] becomes 0/false) and return to the first loop again, but now script won't contiune because it doesn't meet the condition(if [email protected] == 1).

About XOR, http://en.wikipedia.org/wiki/Exclusive_or

Yes, but, how2create (for exampl) a simple GM with it? With 02AB or 02AC?
Since this is for loop activation.
[/quote]

Code:
if [email protected] == 1
then
    02AB: set_actor $player_actor immunities BP 1 FP 1 EP 1 CP 1 MP 1
else
    02AB: set_actor $player_actor immunities BP 0 FP 0 EP 0 CP 0 MP 0
end

(06-21-2014, 11:10 PM)Hidend link Wrote: [ -> ]Do this without sampfuncs springfield?
commands or what?
You need this

0B34: samp register_client_command "activation" to_label

so need sampfuncs...

i want to know how to do activate/desactive option without sampfuncs, for example, in the cleo you posted here... how you will do that without sampfuncs?
Code:
WHILE TRUE
wait 0
if 0ADC: "ABC" //key for activation, key, test_cheat etc.
then 0B12: [email protected] = [email protected] XOR 1
    if [email protected] <> 0
    then 0AD1: "cheat on" 1000
    else 0AD1: "cheat off" 1000
    end
end

//main script       
if [email protected] == 1
then
    0AF9: say_msg "spam spam spam"
end
END //end main loop

The same way without the command thread.