Advertisement
NSKuber

Example

Mar 11th, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. --STARTUP SCRIPT, SAVED IN "/Content/<gamename>/Scripts/Startup/"
  2.  
  3. local FOV = plr_fFOVOverride
  4.  
  5. local SendFOV = function()
  6.   prj_strCustomOccasion = string.gsub(prj_strCustomOccasion,"{FOVforCWM=.-}","")
  7.   prj_strCustomOccasion = prj_strCustomOccasion.."{FOVforCWM="..FOV.."}"
  8. end
  9.  
  10. while true do
  11.   Wait(Delay(0.01))
  12.   if (FOV ~= plr_fFOVOverride) then
  13.     FOV = plr_fFOVOverride
  14.     SendFOV()
  15.   end
  16. end
  17.  
  18. --WORLD SCRIPT, 'READING' THIS
  19.  
  20. local FOV
  21.  
  22. RunHandled(WaitForever,
  23.  
  24. OnEvery(Delay(0.1)),
  25. function()
  26.   local string = prjGetCustomOccasion()
  27.   local config = string.match(string, "{FOVforCWM=.-}")
  28.   if not (config == nil) then
  29.     local arg = string.sub(config,12,-2)
  30.     if not (arg == "") then
  31.       FOV = tonumber(arg)
  32.       if (FOV == -1) then
  33.         if worldGlobals.CWMisBFE then
  34.           FOV = 75
  35.         else
  36.           FOV = 90
  37.         end
  38.       end
  39.     end
  40.   end
  41. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement