Module sv_cooldown

Cooldowns

Functions

GetCooldown (player, cooldown) GetCooldown function.
SetCooldown (player, cooldown, time) SetCooldown function.
HasCooldown (player, cooldown) HasCooldown function.
RemoveCooldown (player, cooldown) RemoveCooldown function.
GetCooldownTime (player, cooldown) GetCooldownTime function.
SetCooldownTime (player, cooldown, time) SetCooldownTime function.
GetCooldownRemaining (player, cooldown) GetCooldownRemaining function.
SetCooldownRemaining (player, cooldown, time) SetCooldownRemaining function.
GetCooldownProgress (player, cooldown) GetCooldownProgress function.
SetCooldownProgress (player, cooldown, progress) SetCooldownProgress function.
GetCooldownPercentage (player, cooldown) GetCooldownPercentage function.
SetCooldownPercentage (player, cooldown, percentage) SetCooldownPercentage function.
GetCooldownSeconds (player, cooldown) GetCooldownSeconds function.
SetCooldownSeconds (player, cooldown, seconds) SetCooldownSeconds function.
GetCooldownMinutes (player, cooldown) GetCooldownMinutes function.
SetCooldownMinutes (player, cooldown, minutes) SetCooldownMinutes function.
GetCooldownHours (player, cooldown) GetCooldownHours function.
SetCooldownHours (player, cooldown, hours) SetCooldownHours function.


Functions

GetCooldown (player, cooldown)
GetCooldown function. This function returns the cooldown time.

Parameters:

  • player The player to get the cooldown time from. number
  • cooldown The cooldown name. string

Returns:

    number

Usage:

    local cooldown = exports.jones_util:GetCooldown(src, "weed")
SetCooldown (player, cooldown, time)
SetCooldown function. This function sets the cooldown time.

Parameters:

  • player The player to set the cooldown time to. number
  • cooldown The cooldown name. string
  • time The cooldown time. number

Usage:

    exports.jones_util:SetCooldown(src, "weed", 1000)
HasCooldown (player, cooldown)
HasCooldown function. This function checks if a player has a cooldown.

Parameters:

  • player The player to check the cooldown from. number
  • cooldown The cooldown name. string

Returns:

    boolean

Usage:

    local hasCooldown = exports.jones_util:HasCooldown(src, "weed")
RemoveCooldown (player, cooldown)
RemoveCooldown function. This function removes the cooldown.

Parameters:

  • player The player to remove the cooldown from. number
  • cooldown The cooldown name. string

Usage:

    exports.jones_util:RemoveCooldown(src, "weed")
GetCooldownTime (player, cooldown)
GetCooldownTime function. This function returns the cooldown time.

Parameters:

  • player The player to get the cooldown time from. number
  • cooldown The cooldown name. string

Returns:

    number

Usage:

    local cooldown = exports.jones_util:GetCooldownTime(src, "weed")
SetCooldownTime (player, cooldown, time)
SetCooldownTime function. This function sets the cooldown time.

Parameters:

  • player The player to set the cooldown time to. number
  • cooldown The cooldown name. string
  • time The cooldown time. number

Usage:

    exports.jones_util:SetCooldownTime(src, "weed", 1000)
GetCooldownRemaining (player, cooldown)
GetCooldownRemaining function. This function returns the cooldown remaining time.

Parameters:

  • player The player to get the cooldown remaining time from. number
  • cooldown The cooldown name. string

Returns:

    number

Usage:

    local cooldown = exports.jones_util:GetCooldownRemaining(src, "weed")
SetCooldownRemaining (player, cooldown, time)
SetCooldownRemaining function. This function sets the cooldown remaining time.

Parameters:

  • player The player to set the cooldown remaining time to. number
  • cooldown The cooldown name. string
  • time The cooldown remaining time. number

Usage:

    exports.jones_util:SetCooldownRemaining(src, "weed", 1000)
GetCooldownProgress (player, cooldown)
GetCooldownProgress function. This function returns the cooldown progress.

Parameters:

  • player The player to get the cooldown progress from. number
  • cooldown The cooldown name. string

Returns:

    number

Usage:

    local cooldown = exports.jones_util:GetCooldownProgress(src, "weed")
SetCooldownProgress (player, cooldown, progress)
SetCooldownProgress function. This function sets the cooldown progress.

Parameters:

  • player The player to set the cooldown progress to. number
  • cooldown The cooldown name. string
  • progress The cooldown progress. number

Usage:

    exports.jones_util:SetCooldownProgress(src, "weed", 0.5)
GetCooldownPercentage (player, cooldown)
GetCooldownPercentage function. This function returns the cooldown percentage.

Parameters:

  • player The player to get the cooldown percentage from. number
  • cooldown The cooldown name. string

Returns:

    number

Usage:

    local cooldown = exports.jones_util:GetCooldownPercentage(src, "weed")
SetCooldownPercentage (player, cooldown, percentage)
SetCooldownPercentage function. This function sets the cooldown percentage.

Parameters:

  • player The player to set the cooldown percentage to. number
  • cooldown The cooldown name. string
  • percentage The cooldown percentage. number

Usage:

    exports.jones_util:SetCooldownPercentage(src, "weed", 50)
GetCooldownSeconds (player, cooldown)
GetCooldownSeconds function. This function returns the cooldown seconds.

Parameters:

  • player The player to get the cooldown seconds from. number
  • cooldown The cooldown name. string

Returns:

    number

Usage:

    local cooldown = exports.jones_util:GetCooldownSeconds(src, "weed")
SetCooldownSeconds (player, cooldown, seconds)
SetCooldownSeconds function. This function sets the cooldown seconds.

Parameters:

  • player The player to set the cooldown seconds to. number
  • cooldown The cooldown name. string
  • seconds The cooldown seconds. number

Usage:

    exports.jones_util:SetCooldownSeconds(src, "weed", 1)
GetCooldownMinutes (player, cooldown)
GetCooldownMinutes function. This function returns the cooldown minutes.

Parameters:

  • player The player to get the cooldown minutes from. number
  • cooldown The cooldown name. string

Returns:

    number

Usage:

    local cooldown = exports.jones_util:GetCooldownMinutes(src, "weed")
SetCooldownMinutes (player, cooldown, minutes)
SetCooldownMinutes function. This function sets the cooldown minutes.

Parameters:

  • player The player to set the cooldown minutes to. number
  • cooldown The cooldown name. string
  • minutes The cooldown minutes. number

Usage:

    exports.jones_util:SetCooldownMinutes(src, "weed", 1)
GetCooldownHours (player, cooldown)
GetCooldownHours function. This function returns the cooldown hours.

Parameters:

  • player The player to get the cooldown hours from. number
  • cooldown The cooldown name. string

Returns:

    number

Usage:

    local cooldown = exports.jones_util:GetCooldownHours(src, "weed")
SetCooldownHours (player, cooldown, hours)
SetCooldownHours function. This function sets the cooldown hours.

Parameters:

  • player The player to set the cooldown hours to. number
  • cooldown The cooldown name. string
  • hours The cooldown hours. number

Usage:

    exports.jones_util:SetCooldownHours(src, "weed", 1)
generated by LDoc 1.5.0 Last updated 2024-05-13 19:05:24