#PLAYERTASKCONTROLLER - variable type checks

This commit is contained in:
Applevangelist 2024-07-28 17:25:20 +02:00
parent 5dd4435b7d
commit 1c24580d3f

View File

@ -133,7 +133,7 @@ function PLAYERTASK:New(Type, Target, Repeat, Times, TTSType)
self.TTSType = TTSType or "close air support" self.TTSType = TTSType or "close air support"
self.lastsmoketime = 0 self.lastsmoketime = 0
if Repeat then if type(Repeat) == "boolean" and Repeat == true and type(Times) == "number" and Times > 1 then
self.Repeat = true self.Repeat = true
self.RepeatNo = Times or 1 self.RepeatNo = Times or 1
end end