Log in to reply
 

Control Action not enabling/disabling



  • I've been messing a bit with _HAS_CHEAT_STRING_JUST_BEEN_ENTERED native to enable/disable various control actions, but for some reason it doesn't work

    Here's a example:

        if (Function.Call<bool>((Hash)0x557E43C447E700A8, Function.Call<int>(Hash.GET_HASH_KEY, "disableswitch"))) //_HAS_CHEAT_STRING_JUST_BEEN_ENTERED
    {
    	Function.Call(Hash.DISABLE_CONTROL_ACTION, 2, 19, true); //CharacterWheel
    	UI.Notify("cheat activated");
    }
    

    The notification is shown, but like i said, the control action isn't getting disabled. Anybody has any idea why?


  • MODERATOR

    @Alex106 I'm fairly sure DISABLE_CONTROL_ACTION must be called continuously.



  • @stillhere I had the same thought
    Anyway, i managed to make it work in this way (for anyone interested)

        if (Function.Call<bool>((Hash)0x557E43C447E700A8, Function.Call<int>(Hash.GET_HASH_KEY, "disableswitch"))) //_HAS_CHEAT_STRING_JUST_BEEN_ENTERED
    {
    	ToggleSWITCH = true;
    }
        else if (Function.Call<bool>((Hash)0x557E43C447E700A8, Function.Call<int>(Hash.GET_HASH_KEY, "enableswitch"))) //_HAS_CHEAT_STRING_JUST_BEEN_ENTERED
    {
    	ToggleSWITCH = false;
    }
        if (ToggleSWITCH)
    {
    	Function.Call(Hash.DISABLE_CONTROL_ACTION, 2, 19, true); //CharacterWheel
    }
        else
    {
    	Function.Call(Hash.ENABLE_CONTROL_ACTION, 2, 19, true); //CharacterWheel
    }
    

Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.