Garry's Mod Wiki

function

Functions in lua can also be put into variables just like a number or a string can.

local function killAllPlayers() for _, ply in ipairs(player.GetAll()) do ply:Kill() end end killAllPlayers()

They can be fed to other functions and methods, such as concommand.Add, also be stored in tables.

Page Links


Special Pages


Wikis

?

Render Time: 33ms

DB GetPage 3
Generate Html 1
SaveChanges (1) 13
Render Body 0
Render Sidebar 13