how to modify a cheats enable and disable

MalikeiraOPoder

Active member
Joined
Mar 16, 2019
Messages
100
Reaction score
2
Hi everyone, I do not know much about script and I want to make this mod to activate and deactivate, can do it for me and then explain to me how to do it to activate and deactivate
 

Attachments

  • ReloadGun.cs
    17.2 KB · Views: 5

Valiuks

Active member
Joined
Sep 9, 2018
Messages
25
Reaction score
4
how would you like to activate or deactivate?
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,134
Solutions
5
Reaction score
885
Location
Lithuania
ORGINAL CODE
PHP:
{$CLEO .cs}

0000: NOP 

WHILE TRUE
WAIT 0 

IF 
Player.Defined($PLAYER_CHAR)
THEN 
    0470: 1@ = actor $PLAYER_ACTOR current_weapon 
    Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, 1@, 0)
    wait 150 
END

END

EDITED CODE
PHP:
{$CLEO .cs}

0000: NOP 

WAIT 10000 // WAIT UNTIL SAMP IS READY

WHILE TRUE
WAIT 0 

IF
0ADC:   test_cheat "CODE" // GTA SA CHEAT CODE[OPCODE]
THEN
    IF
    10@ == FALSE  // IF IS DISSABLED THEN.. 
    THEN
        10@ = TRUE // ENABLE
        0AD1: show_formatted_text_highpriority "This is ENABLE" time 2000  /// SHOW ENABLE TEXT
    ELSE // ELSE .. IF IS ENABLED THEN...
        10@ = FALSE  /// DISSABLE
        0AD1: show_formatted_text_highpriority "This is DISSABLE" time 2000  /// SHOW DISSABLE TEXT
    END
END

IF AND
10@ == TRUE
Player.Defined($PLAYER_CHAR)
THEN 
    0470: 1@ = actor $PLAYER_ACTOR current_weapon 
    Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, 1@, 0)
    wait 150 
END

END
 
Top