SHARE
TWEET

Untitled

a guest Nov 12th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function SCHEMA:PlayerSpray(client) -- Disables the ability to spray
  2.     return true
  3. end
  4.  
  5. function SCHEMA:PlayerSwitchFlashlight(ply, on) -- Enables Flashlight
  6.     return true
  7. end
  8. function SCHEMA:OnCharCreated(client, character)
  9.     local inventory = character:getInv()
  10.     local char = client:getChar()
  11.     local endurance = char:getAttrib("endurance")
  12.     local healthcalc = (15 + (17 * endurance))
  13.     client:SetMaxHealth(healthcalc)
  14.     client:SetHealth(healthcalc)
  15.     if (inventory) then    
  16.         if (character:getFaction() == FACTION_BOS or character:getFaction() == FACTION_LEGION) then
  17.             inventory:add("dogtags", 1, {
  18.                 name = character:getName(),
  19.                 id = math.random(10000, 99999)
  20.             })
  21.         elseif (character:getFaction() == FACTION_NCR) then
  22.             inventory:add("dogtags", 1, {
  23.                 name = character:getName(),
  24.                 id = math.random(10000, 99999)
  25.             })
  26.         end
  27.     end
  28. end
  29. function SCHEMA:PlayerSpawn(client)
  30.     local char = client:getChar()
  31.     local endurance = char:getAttrib("endurance")
  32.     local healthcalc = (15 + (17 * endurance))
  33.     local healthset=(healthcalc*0.25)
  34.     client:SetHealth(healthset)
  35. end
  36. --[[
  37. function SCHEMA:OnCharVarChanged(character, key, oldValue, value) -- Not currently using, but it's a very helpful function we could use in the future.
  38.     if (key == "model" and IsValid(character:getPlayer())) then
  39.     end
  40. end
  41. --]]
  42.  
  43. function SCHEMA:PostPlayerLoadout(client)
  44.  
  45.     local curModel = client:getChar():getModel()
  46.     local char = client:getChar()
  47.     local endurance = char:getAttrib("endurance")
  48.     local healthcalc = (15 + (17 * endurance))
  49.     client:SetMaxHealth(healthcalc)
  50.    
  51.    
  52.     if curModel == "models/half-dead/metrollfix/a1b1.mdl" then
  53.    
  54.         client:SetModel(curModel)
  55.         client:SetSkin(1)
  56.         client:SetBodyGroups("2200")
  57.  
  58.     elseif curModel == "models/half-dead/metrollfix/a2b1.mdl" then
  59.    
  60.         client:SetModel(curModel)
  61.         client:SetSkin(0)
  62.         client:SetBodyGroups("1000")
  63.     elseif curModel == "models/half-dead/metrollfix/a3b1.mdl" then
  64.    
  65.         client:SetModel(curModel)
  66.         client:SetSkin(1)
  67.         client:SetBodyGroups("5000")
  68.     elseif curModel == "models/half-dead/metrollfix/a4b1.mdl" then
  69.    
  70.         client:SetModel(curModel)
  71.         client:SetSkin(1)
  72.         client:SetBodyGroups("3000")
  73.     elseif curModel == "models/half-dead/metrollfix/a5b1.mdl" then
  74.    
  75.         client:SetModel(curModel)
  76.         client:SetSkin(1)
  77.         client:SetBodyGroups("3000")
  78.     elseif curModel == "models/half-dead/metrollfix/a6b1.mdl" then
  79.    
  80.         client:SetModel(curModel)
  81.         client:SetSkin(0)
  82.         client:SetBodyGroups("2200")
  83.     elseif curModel == "models/half-dead/metrollfix/f1b1.mdl" then
  84.    
  85.         client:SetModel(curModel)
  86.         client:SetSkin(0)
  87.         client:SetBodyGroups("100")
  88.     elseif curModel == "models/half-dead/metrollfix/f2b1.mdl" then
  89.    
  90.         client:SetModel(curModel)
  91.         client:SetSkin(0)
  92.         client:SetBodyGroups("100")
  93.     elseif curModel == "models/half-dead/metrollfix/f3b1.mdl" then
  94.    
  95.         client:SetModel(curModel)
  96.         client:SetSkin(0)
  97.         client:SetBodyGroups("100")
  98.     elseif curModel == "models/half-dead/metrollfix/f4b1.mdl" then
  99.    
  100.         client:SetModel(curModel)
  101.         client:SetSkin(0)
  102.         client:SetBodyGroups("100")
  103.     elseif curModel == "models/half-dead/metrollfix/f6b1.mdl" then
  104.    
  105.         client:SetModel(curModel)
  106.         client:SetSkin(0)
  107.         client:SetBodyGroups("100")
  108.     elseif curModel == "models/half-dead/metrollfix/f7b1.mdl" then
  109.    
  110.         client:SetModel(curModel)
  111.         client:SetSkin(0)
  112.         client:SetBodyGroups("100")
  113. end    
  114. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top