Forum

> > CS2D > Scripts > Knife fight script, can someone help?
Forums overviewCS2D overview Scripts overviewLog in to reply

English Knife fight script, can someone help?

8 replies
To the start Previous 1 Next To the start

old Knife fight script, can someone help?

Geez
GAME BANNED Off Offline

Quote
I have a question.

Could you make one lua script for me, plz?

details here:
Spoiler >

old Re: Knife fight script, can someone help?

Yates
Reviewer Off Offline

Quote
You mean that you have allot of players (have guns) but when there is only 1 vs 1 the guns will be removed from them ?
PS: I don't know lua, just asking because i don't understand

old Re: Knife fight script, can someone help?

Geez
GAME BANNED Off Offline

Quote
no, i meant normal game, but when is 1 living ct & 1 living T (last man stand) they have knife fight. Winner will have weapons back, looser no.
and if last ct player won then CT won and round ends (T too)

now you understand>?

EDIT
--------
> all players have weapons normally
> when is only 1 ct (all other ct are dead) and only 1 t (all other t are dead)
• they will have knifes only
• they will fight (knifes only)
> when one of them kill other start next round and goto first point (all players...)

old Re: Knife fight script, can someone help?

Banaan
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
addhook("die","func")
addhook("select","noweapchange")
addhook("endround","weapchange")

function func()
	if #player(0,"team1living")==1 and #player(0,"team2living")==1 then
		parse("setweapon "..player(0,"team1living")[1].." 50")
		parse("setweapon "..player(0,"team2living")[1].." 50")
		knifes=true
	end
end

function noweapchange(id,type)
	if knifes==true and type~=50 then parse("setweapon "..id.." 50") end
end

function weapchange()
	knifes=false
end

Make sure that gamemode is standard.

old Re: Knife fight script, can someone help?

Geez
GAME BANNED Off Offline

Quote
First post:
More >



Tested. All work. Some changes and i will use it on my server

And of course upload to File Archive
edited 1×, last 27.01.11 09:19:01 pm

old Nice

Hank2417
User Off Offline

Quote
Its Really Cool To Have The Script
us = FTW!

old Re: Knife fight script, can someone help?

Geez
GAME BANNED Off Offline

Quote
@AleXXT

ehh copy that Banaan written, save as .lua file, put it into CS2D folder/sys/lua, edit server.lua and add line:

dofile("sys/lua/HERE_FILE_NAME.lua")
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview