kwilcz / Antario

Clean base/cheat made for CS:GO.
MIT License
131 stars 34 forks source link

Checkbox call function #12

Closed Monsterxsync closed 6 years ago

Monsterxsync commented 6 years ago

Is it possible to make it so a checkbox can call a function also? E.g

void RecoilCrosshairToggle()
{
    if (g_Settings.Misc.bRecoilCrosshairEnabled)
        g_pEngine->ExecuteClientCmd("crosshair 0");
    else
        g_pEngine->ExecuteClientCmd("crosshair 1");

    g_Settings.Misc.bRecoilCrosshairEnabled = !g_Settings.Misc.bRecoilCrosshairEnabled;
}
certmemer commented 6 years ago

or dont be a retard and use a button instead?

Monsterxsync commented 6 years ago

Or don't be a cunt and assume im not already doing that. Having a toggle on checkbox is extra functionality and alot of the time you need more that just toggling a bool.

kwilcz commented 6 years ago

This is useless for me to be fair. You can just call your RecoilCrosshairToggle() function in createmove if your setting is true o just use a regular button (or create toggle-button, but w/e). I generally would prefer to avoid calling any engine functions in drawing engine, as they don't like to cooperate.