Oneline

ssr-private plugin example

Apr 22nd, 2022 (edited)
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. require "Private"
  2.  
  3. Private.getLimit = function(faction) -- available points
  4.     if faction == nil then
  5.         return 0
  6.     end
  7.  
  8.     local points = 0; -- starting points
  9.     local members = faction:getPlayers():size();
  10.     return points + math.floor(members / 3); -- starting points + points per 3 players
  11. end
  12.  
  13. Private.getCost = function(safehouse, offset) -- cost of the area
  14.     offset = offset or 0;
  15.     local cost = math.ceil(((safehouse:getH() - offset) * (safehouse:getW() - offset)) / 100);
  16.     return cost;
  17. end
Advertisement
Add Comment
Please, Sign In to add comment