# Cheat Type Used
Grammar — Used cheat type
Flags —Native
|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
- Cheat Used — TriggerAddEventCheatUsed
# Related
Category: Game / Chat And Console
- Chat Message —
void
— TriggerAddEventChatMessage - Cheat Used —
void
— TriggerAddEventCheatUsed - Chat String —
string
— EventChatMessage - Cheat Type Used —
int
<preset::GameCheatType> — EventCheatUsed - Console Command —
bool
— ConsoleCommand - Cheats Enabled —
bool
— GameCheatsEnabled - Allow Cheat —
void
— GameCheatAllow
# Examples
campaigns/voidstory.sc2campaign — base.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.sc2mod — base.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()]);