# Cheat Type Used

Grammar — Used cheat type
FlagsNative | Function

Returns the cheat a player used. Only usable in response to a Cheat Used event.

Returns — int<preset::GameCheatType>

native int EventCheatUsed();

# Supported triggers

Category: Game / Chat And Console

# Examples

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:6304

    auto731EB4A6_var = 0;
    for ( ; auto731EB4A6_var <= auto731EB4A6_ae; auto731EB4A6_var += 1 ) {
        if ((auto731EB4A6_var == (EventCheatUsed()))) {
            TriggerEnable(libVCMI_gt_PS_GameCheat_CheckboxUsed, false);
            libVCMI_gv_pM_GameCheat_CheatState[auto731EB4A6_var] = !(libVCMI_gv_pM_GameCheat_CheatState[auto731EB4A6_var]);

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCMI.galaxy:5240

    IntLoopBegin(0, 25);
    for ( ; !IntLoopDone() ; IntLoopStep() ) {
        if ((IntLoopCurrent() == (EventCheatUsed()))) {
            TriggerEnable(libNCMI_gt_NS_GameCheat_CheckboxUsed, false);
            libNCMI_gv_NM_GameCheat_CheatState[IntLoopCurrent()] = !(libNCMI_gv_NM_GameCheat_CheatState[IntLoopCurrent()]);