Forum

> > CS2D > Scripts > Someone can do this script?
Forums overviewCS2D overview Scripts overviewLog in to reply

English Someone can do this script?

4 replies
To the start Previous 1 Next To the start

old Someone can do this script?

Jedediastwo
User Off Offline

Quote
Terrorists can't pick weapons.
Terrorists when die. don't drop weapons and armor.

Only 3 terrorists. and unlimited counter terrorists

Auto equip terrorists with:
Super Armor, 250 HP, Chainsaw, Machete, HE.

Command for terrorists: !buy airstrike (costs 5000 money)
only terrorists can use it.

old Re: Someone can do this script?

Cure Pikachu
User Off Offline

Quote
I guess this is how you do it?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
-- Terrorists can't pick weapons.
addhook("walkover","_walkover")
function _walkover(id,iid,t)
	if player(id,"team") == 1 then
		-- This prevents Ts from picking up anything
		return 1
	end
end

-- Terrorists when die. don't drop weapons and armor.
addhook("die","_die")
function _die(victim)
	if player(victim,"team") == 1 then
		return 1
	end
end

-- Only 3 terrorists. and unlimited counter terrorists
parse("mp_autoteambalance 0")

addhook("team","_team")
function _team(id,t)
	if t == 1 then
		if #player(0,"team1") >= 3 then
			parse("makect "..id)
			return 1
		end
	end
end

--[[
Auto equip terrorists with:
Super Armor, 250 HP, Chainsaw, Machete, HE.
]]
addhook("spawn","_spawn")
function _spawn(id)
	if player(id,"team") == 1 then
		parse("setmaxhealth "..id.." 250")
		parse("setarmor "..id.." 205")
		return "51,69,85"
	else
		parse("setmaxhealth "..id.." 100")
	end
end

--[[
Command for terrorists: !buy airstrike (costs 5000 money)
only terrorists can use it.
]]
addhook("say","_say")
addhook("sayteam","_say")
function _say(id,t)
	if string.lower(t) == "!buy airstrike" then
		if player(id,"team") == 1 then
			if player(id,"money") >= 5000 then
				parse("setmoney "..id.." "..player(id,"money")-5000)
				parse("equip "..id.." 76")
			else
				msg2(id,"\169255000000You have insufficient funds!")
			end
		else
			msg2(id,"\169255000000Only Terrorists have access to this command!")
		end
		return 1
	end
end
edited 2×, last 05.11.16 09:25:41 pm

old Re: Someone can do this script?

Jedediastwo
User Off Offline

Quote
user Cure Pikachu has written
I guess this is how you do it?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
-- Terrorists can't pick weapons.
addhook("walkover","_walkover")
function _walkover(id,iid,t)
	if player(id,"team") == 1 then
		-- This prevents Ts from picking up anything
		return 1
	end
end

-- Terrorists when die. don't drop weapons and armor.
addhook("die","_die")
function _die(victim)
	if player(victim,"team") == 1 then
		return 1
	end
end

-- Only 3 terrorists. and unlimited counter terrorists
parse("mp_autoteambalance 0")

addhook("team","_team")
function _team(id,t)
	if t == 1 then
		if #player(0,"team1") >= 3 then
			parse("makect "..id)
			return 1
		end
	end
end

--[[
Auto equip terrorists with:
Super Armor, 250 HP, Chainsaw, Machete, HE.
]]
addhook("spawn","_spawn")
function _spawn(id)
	parse("setmaxhealth "..id.." 250")
	parse("setarmor "..id.." 205")
	return "51,69,85"
end

--[[
Command for terrorists: !buy airstrike (costs 5000 money)
only terrorists can use it.
]]
addhook("say","_say")
addhook("sayteam","_say")
function _say(id,t)
	if string.lower(t) == "!buy airstrike" then
		if player(id,"team") == 1 then
			if player(id,"money") >= 5000 then
				parse("setmoney "..id.." "..player(id,"money")-5000)
				parse("equip "..id.." 76")
			else
				msg2(id,"\169255000000You have insufficient funds!")
			end
		else
			msg2(id,"\169255000000Only Terrorists have access to this command!")
		end
		return 1
	end
end


Have a error ir your script, the counter terrorists are equiped, how remove CT equips?

old Re: Someone can do this script?

Cure Pikachu
User Off Offline

Quote
Oh yeah I forgot.
1
2
3
4
5
6
7
8
9
10
addhook("spawn","_spawn")
function _spawn(id)
	if player(id,"team") == 1 then
		parse("setmaxhealth "..id.." 250")
		parse("setarmor "..id.." 205")
		return "51,69,85"
	else
		parse("setmaxhealth "..id.." 100")
	end
end
edited 1×, last 05.11.16 09:26:07 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview