English Knife fight script, can someone help?

8 replies
Goto Page
To the start Previous 1 Next To the start
Up
Geez
GAME BANNED
Offline Off
I have a question.

Could you make one lua script for me, plz?

details here:
Spoiler >
06.01.11 06:46:11 pm
Up
Yates
Reviewer
Offline Off
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
06.01.11 06:56:06 pm
Up
Geez
GAME BANNED
Offline Off
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...)
06.01.11 07:20:30 pm
Up
Banaan
User
Offline Off
Code:
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.
06.01.11 07:54:55 pm
Up
Geez
GAME BANNED
Offline Off
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
05.02.11 08:53:18 am
Up
Hank2417
User
Offline Off
Its Really Cool To Have The Script
us = FTW!
Metal Gear Solid and Madness Combat FTW
08.02.11 03:46:00 pm
Up
Geez
GAME BANNED
Offline Off
Idea taken from Counter-Strike: Source

in CSS this is very popular script on servers
08.03.11 04:44:11 pm
Up
AleXXT
User
Offline Off
Where can I put this?
edited 1×, last 08.03.11 06:43:17 pm
CS:S, CS:GO, CS2D, usw.
15.03.11 04:38:07 pm
Up
Geez
GAME BANNED
Offline Off
@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