
Counter-Strike 2D has written
You wrote a CS2D tutorial which could help others? We will publish it!


if (something) then -- Change "something" variable value to false something = false -- If otherwise (false) else -- Change "something" variable value to true something = true end
something=not something
-- Create random new variable which has false value something = false -- Add new "say" hook which triggered when player say something to "sayhook" function addhook ("say", "sayhook") -- Create new function for "say" hook function sayhook (id, message) -- Check if "message" is "!something" if (message == "!something") then -- Check if "something" variable is true if (something) then -- Change "something" variable value to false something = false -- If otherwise (false) else -- Change "something" variable value to true something = true end end end
Variable = 7
addhook("example", "myExampleFunction")
_G.addhook("example", "myExampleFunction")
table = {1,2,3,4,5,6,7,8,9,10} table = nil
table = {1,2,3,4,5,6,7,8,9,10} for i in pairs(table) do table[i] = nil end