Avo: Counter-Strike 2D has written
You wrote a CS2D tutorial which could help others? We will publish it!
Starkkz should contact
DC to add link to this post on Counter-Strike 2D website in Tutorials section.
Scripts
[GUIDE] How to script
Avo:
Starkkz should contact
DC to add link to this post on Counter-Strike 2D website in Tutorials section.
Dousea has writtenif (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
Dousea has written
Raaj Nadar: -- 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
File does not exist (12800).
Ajmin: The arrays are the same as tables, it's like a list where you can store variables.Variable = 7
Ajmin: In addition what
Starkkz said:
addhook is a global Lua function. You call it by using addhook("example", "myExampleFunction")
_G.addhook("example", "myExampleFunction")
h2o1: That's a server setting.
mp_killbuildings
Yates: thanks a lot
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
Quattro: new comers may not know what garbage collection is, I prefer not to add terms that they're probably going to forget through the tutorial. They will figure out themselfes when they're more advanced in the topic.