How can I reward my players for staying in formation?

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)
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

What are the tablet controls?

Tablet controls are as follows:...

How do I craeate new preset formation?

All Preset formations can be found in wos/ufs/fb/formations/ When creating your own formation you...

How do I add quiz question?

All questions can be found in wos/ufs/fb/questions/ When creating your own questions you can...