Forum
CS2D Scripts Last Man Standing GameMode!Last Man Standing GameMode!
5 Antworten 1
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
addhook("kill","check") function check(a,b) 	local c = player(0,"tableliving") 	if #c == 1 then 		for k,v in pairs(c) do 			msg(player(v,"name").." is the last man standing@C") 		end 	end end
This..?
Rainoth hat geschrieben
This..?
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
addhook("kill","check") function check(a,b) 	local c = player(0,"tableliving") 	if #c == 1 then 		for k,v in pairs(c) do 			msg(player(v,"name").." is the last man standing@C") 		end 	end end
This..?
Correctly, but add a color for better
Locate autorun in Counter-Strike2D/sys/lua/
Put it there
Option 2:
Open notepad.
Copy the code.
Paste the code in notepad.
Save it as <name>.lua (for example LastMan.lua)
Put it in Counter-Strike2D/sys/lua/
Choice A:
Use command mp_luaserver and write path (for example "sys/lua/LastMan.lua", mind the quotes)
Choice B: Locate server.lua in the very same folder. Open it and add a line
1
dofile("sys/lua/LastMan.lua") -- or any other name that you chose
Option 3:
It involves getting a lua file, renaming it into map name (like de_dust for example), enabling map lua running (there's a setting for that) and running the map. Other two options are easier to use though.
Good luck.
1