0ADC

From GTAMods Wiki
Revision as of 03:43, 29 January 2017 by Spaceeinstein (talk | contribs) (Created page with "{{OpCode | games = {{Icon|t}} (with CLEO) | description = Tests the cheat | syntax1 = 0ADC:   test_cheat "[''string'']" | p1t = [''string''] | p1d...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

GTA III Vice City San Andreas (with CLEO)


Description
Tests the cheat
Syntax
0ADC:   test_cheat "[string]"
Parameter
[string]
Input cheat, maximum 30 characters

This conditional CLEO opcode returns true if the specified string of letters has been typed on the keyboard as though you are inputting a cheat code. Any lower case letters (a-z) are converted to upper case by CLEO during run-time.

Example

The following example pops up different notifications when you type "CHEAT".

// set constants
const
IS_ACTIVE = 0@
end

// initialise
IS_ACTIVE = 0

while true
    wait 10
    if
        0ADC:   test_cheat "CHEAT"
    then
        if
            IS_ACTIVE == 0
        then
            IS_ACTIVE = 1
            0ACA: show_text_box "Cheat activated"
        else
            IS_ACTIVE = 0
            0ACA: show_text_box "Cheat deactivated"
        end
    end
end

Keywords

test, cheat