Rewarding players in formation. You can choose to reward players at set intervals for being in formation. You can find an example hook in the following file, wos/ufs/squad-link/core/sv_core.lua at line 257. Here is the hook
hook.Add("wOS.UFS.InFormationReward", "wOS.UFS.InFormationRewardTest", function(plys)
-- You can reward Players for being in formation here. end) The plys argument is table of players who are currently in formation. To reward each player we need to iterate through the list. Here is an Example hook rewarding the player with ALCS xp.
hook.Add("wOS.UFS.InFormationReward", "wOS.UFS.InFormationALCSXPReward", function(plys)
for _, ply in ipairs(plys) do
ply:AddSkillXP( 10000 )
end
end)