Garry's Mod

Garry's Mod

Nedostatek hodnocení
TTT Startup Script Loader
   
Ocenit
Přidat do oblíbených
Oblíbeno
Odebrat z oblíbených
Content Type: Addon
Addon Type: ServerContent
Velikost souboru
Přidáno
Aktualizováno
1.875 KB
15. led. 2019 v 23.12
3. bře. 2019 v 17.01
Poznámky ke změnám (6) – zobrazit

Klikněte na „Odebírat“ pro stažení položky
TTT Startup Script Loader

Popis
Loads lua scripts at TTT startup. To use, add lua files to "lua/ttt_startup_scripts".

For example, "lua/ttt_startup_scripts/say_hi.lua":

if SERVER then print("Hi server!") else print("Hi client!") end

The scripts are run once at TTT initialization, within a "pcall".
The scripts are run in the global environment, with the following extra functions:

  • "getEquipment()" - returns TTT's underlying "Equipment" table (available only to "CLIENT").
  • "getOriginalEquipment()" - returns a copy of the "Equipment" table as it was before any scripts ran (available only to "CLIENT").
  • "getDeathsounds()" - returns TTT's underlying "deathsounds" table (available only to "SERVER").
  • "getOriginalDeathsounds()" - returns a copy of the "deathsounds" table as it was before any scripts ran (available only to "SERVER").
  • "lookupInFunc(func, ...)" - looks up a variable available to the specified function. Specify multiple varargs to chain lookups.
  • "deepCopy(v)" - makes a deep copy of any value.
  • "extendSWEP(weapon_class, tab)" - merges "tab" into a SWEP. Note that all calls to this function after "getEquipment()" or "getOriginalEqipment()" have undefined behavior.
Počet komentářů: 2
MaikysuN 23. dub. 2021 v 16.29 
Could you accept my friends invite? I have a question regarding codies but cannot add you elsewhere.
Wemic 10. srp. 2020 v 18.56 
Will this mod work for sandbox servers?