Advertisement
NSKuber

Untitled

Jun 6th, 2020
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. worldGlobals.CreateRPC("server","reliable","SendChangedFireSpeedToAll",function(weapon,fSpeed)
  2. if IsDeleted(weapon) then return end
  3. weapon:SetFireRateMultiplier(fSpeed)
  4. end
  5.  
  6. worldGlobals.CreateRPC("client","reliable","PleaseChangeMyFiringSpeed",function(weapon,fSpeed)
  7. if IsDeleted(weapon) then return end
  8. weapon:SetFireRateMultiplier(fSpeed)
  9. if not worldInfo:IsSinglePlayer() and worldGlobals.netIsHost then
  10. worldGlobals.SendChangedFireSpeedToAll(weapon,fSpeed)
  11. end
  12. end
  13.  
  14. --And then you call "worldGlobals.PleaseChangeMyFiringSpeed" on client on button press when needed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement