Forum

> > CS2D > Scripts > Last Man Standing GameMode!
Forums overviewCS2D overview Scripts overviewLog in to reply

English Last Man Standing GameMode!

5 replies
To the start Previous 1 Next To the start

old Last Man Standing GameMode!

_-098-
GAME BANNED Off Offline

Quote
I want to create a hunger games server but i cant find a "Last man standing" Lua script anywhere! and i need some help please! i allready have a map, i just need the lua script! or anything that will get me a Last Man Standing Game Mode!

old Re: Last Man Standing GameMode!

Rainoth
Moderator Off Offline

Quote
1
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..?

old Re: Last Man Standing GameMode!

Skyppy
User Off Offline

Quote
user Rainoth has written
1
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

old Re: Last Man Standing GameMode!

_-098-
GAME BANNED Off Offline

Quote
Im sorry but i have no idea what the code is used for or how to use it or where to put it... im a noob... can you please tell me step by step what im suposed to do?

old Re: Last Man Standing GameMode!

Rainoth
Moderator Off Offline

Quote
Option 1:
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 cs2d cmd 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.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview