Jump to content

AWARD REFUEL

From CMM Wiki
Return to CMM Command Reference
Environment: Mission Scripting
Function: AWARD_REFUEL
Function Description: Checks if a player earned a refueling bonus during a sortie by measuring the time between the start of refueling and its end, awarding the bonus if it exceeds 30 seconds and the player hasn't already received it.
File Location: cmm.XpFunctions.lua
Syntax: CMM.AWARD_REFUEL( table PlayerAircraft )
Return Value:
Parameters: Name Description
PlayerAircraftEvent table from a refueling stopped event containing initiator, time, and position; used to determine the duration of refueling and trigger award logic.
Example: CMM.AWARD_REFUEL({initiator = 12345, time = 1640995200})
Example Description: Processes a refueling stop event to verify if the refueling duration exceeds 30 seconds and awards a bonus if valid, otherwise notifies the player that the bonus was already earned.
Related Functions:
Notes: --TODO Code review required