You have typo in function gamelpay_msg_code_init()
This code show GPS activated on fire from gun and GPS deactivated on sprint
This code show GPS activated on fire from gun and GPS deactivated on sprint
Code:
local My_Thread_Handle = INVALID_THREAD_HANDLE
a = "deactivated"
b = "activated"
function function_msg_off_on()
if player_action_is_pressed("CBA_OFC_ATTACK_PRIMARY") then
mission_help_table("GPS " .. b, LOCAL_PLAYER)
end
if player_action_is_pressed("CBA_OFC_SPRINT") then
mission_help_table("GPS " .. a, LOCAL_PLAYER)
end
end
function gameplay_msg_code_init()
My_Thread_Handle = thread_new("my_thread_manager")
end
function my_thread_manager()
while true do
function_msg_off_on()
delay(1)
end
end