 
	Attachments
			
				Last edited: 
			
		
	
								
								
									
	
								
							
							 
	By using "CBA_OFC_ATTACK_PRIMARY" action. Yo can find all button actions in the control_binding_sets.xtbl. That way is not ideal because it will be working on every pressing buttons, even if you fly or jump. Need more check player state for proper result.How do you assign commands to weapons?
Remember my SupperHawt script? It also included a mock-up weapon to toggle the effect on and off, check the code:How do you assign commands to weapons?
function sh_trigger_thread()
    -- MAKE SURE THAT SUPPERHAWT CAM IS EQUIPPED AND WE'RE NOT IN STORE MENU
    if inv_item_is_equipped("SupperHawt_Cam", LOCAL_PLAYER) and not store_interface_is_active() then
        -- LET THE PLAYER DECIDE WHETHER THEY PREFER TIMER MODE OR INFINITE MODE
        if TIMER_SWITCH then
            hud_prompt(LOCAL_PLAYER, "SH_TRIGGER_TIMER", "sh_trigger_infinite")
        else
            hud_prompt(LOCAL_PLAYER, "SH_TRIGGER_INFINITE", "sh_trigger_timer")
        end
        -- TOGGLE SUPPERHAWT EFFECT WHEN PLAYER PULLS THE TRIGGER
        if player_action_is_pressed("CBA_OFC_ATTACK_PRIMARY") then
            if not TRIGGER_PUSHED then
                if SUPPERHAWT_SWITCH then
                    SUPPERHAWT_SWITCH = false
                else
                    SUPPERHAWT_SWITCH = true
                    if TIMER_SWITCH then
                        if not TIMER_TUTORIAL then
                            mission_help_table("SH_TIMER_TUTORIAL", SYNC_LOCAL)
                            TIMER_TUTORIAL = true
                        end
                    end
                end
                TRIGGER_PUSHED = true
            end
        else
            TRIGGER_PUSHED = false
        end
        -- TOGGLE CUSTOM MUSIC WHEN PLAYER PRESSES THE RELOAD BUTTON
        if player_action_is_pressed("CBA_OFC_PICKUP_RELOAD") then
            if not RELOAD_PUSHED then
                if SUPPERHAWT_MUSIC then
                    SUPPERHAWT_MUSIC = false
                else
                    SUPPERHAWT_MUSIC = true
                end
                RELOAD_PUSHED = true
            end
        else
            RELOAD_PUSHED = false
        end
    end
end1) your thread has the same name as mineThats strange.If i delete the haarp from mod folder my gps mod stops working.
If both are installed together gps mod works fine but haarp mod doesn't change TOD.
I thougt about that and changed the thread manager name and functuon names but it was the same behavior but i will try it again and post result here.Maybe it is the same with string names i didnt check the strings all my strings are named MSG_XXXXX?I dont understand that even if the mods have the same name why doesnt my mod work if yours isnt installed?Is this causing by the way the workshop patch works? Or is that the modified lua interpreter?1) your thread has the same name as mine
2) your function has the same name as mine
For HAARP
function function_with_my_code()
my_thread_manager()
Before I wasn't sure about names conflict but I test it and it's really exist, so I recommend you to make your function's names uniq, add your nick to it to them or so.
As I said you are using same thread nameChanged all names but then the mod stops working at all neather with nor without haarp.Haarp is working.Without changing names gps works but haarp cant change tod.Cant understand it.
