Each officer, warrant officer, and enlisted person ordered for duty by the Governor or under his or her authority by the commanding general of the National Guard shall be paid by the state for every day actually on duty the same basic pay as officers and enlisted personnel of the United States Armed Forces of equal grade, rating, and length of service and such allowances as may be authorized in rules issued in accordance with the provisions of this code or at a flat daily rate of forty dollars ($40.00) for each day of twenty-four (24) hours or less actually spent on active duty, whichever is greater. However, officers and enlisted personnel shall not receive from the state the pay and allowances provided by this section when ordered on duty thereunder in compliance with instructions from the federal government for services for which they are to receive pay and allowances from federal funds.