Does an alternative to self.Weapon:SetNextReload exist?
2 replies, posted
I've given a weapon I'm working on a SWEP:Reload() function, and it seems to work correctly for the most part. However, I'd like there to be some delay between using the reload function, and apparently self.Weapon:SetNextReload doesn't exist. self.Weapon:SetNextPrimaryFire does, however.
Create a self.NextReload=CurTime() in the SWEP:Initialize(),and then just do.
[lua]
function SWEP:Reload()
if self.NextReload <CurTime() then
//your functions
self.NextReload=CurTime()+Whateverdelay
end
end
[/lua]
Oh! Thanks. I forgot all about that. (Initializing it, I mean.)
Sorry, you need to Log In to post a reply to this thread.