Forum

> > CS2D > Scripts > Please fix this script:
Forums overviewCS2D overview Scripts overviewLog in to reply

English Please fix this script:

4 replies
To the start Previous 1 Next To the start

old Please fix this script:

Obviously Exactly Myself
User Off Offline

Quote
Please fix script because when when I change class or team the hat is still there. It's like: "Hey look at me! I'm a noob, I'm wearing 9 hats!"

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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
addhook("spawn","sample.classes.spawn")
function sample.classes.spawn(id)
	-- SOLDIER
	if (sample.classes.class[id]<=1) then
		parse ("setmaxhealth "..id.." 100")
		parse ("setarmor "..id.." 201")
		parse ("speedmod "..id.." 2")
		parse ("strip "..id.." 50")
		if(hat==0) then
			hat = 1
			if player(id,"team")==2 then
				id1=image("gfx/sOmEtHiNg/Soldier_CT.png",1,1,200+id)
			else
				if player(id,"team")==1 then
					id1=image("gfx/sOmEtHiNg/Soldier_T.png",1,1,200+id)
				end
			end
		end
		return "22,51,85";
	end
	-- DEMOMAN
	if (sample.classes.class[id]<=2) then
		parse ("setmaxhealth "..id.." 150")
		parse ("setarmor "..id.." 202")
		parse ("speedmod "..id.." -3")
		if(hat==0) then
			hat = 2
			if player(id,"team")==2 then
				id1=image("gfx/sOmEtHiNg/Demoman_CT.png",1,1,200+id)
			else
				if player(id,"team")==1 then
					id1=image("gfx/sOmEtHiNg/Demoman_T.png",1,1,200+id)
				end
			end
		end
		return "49,4,51";
	end
	-- SNIPER
	if (sample.classes.class[id]==3) then
		parse ("setmaxhealth "..id.." 80")
		parse ("setarmor "..id.." 206")
		parse ("strip "..id.." 50")
		parse ("setweapon "..id.." 34")
		parse ("speedmod "..id.." 5")
		return "34,21,69,73,3,52";
	end
	-- MEDIC
	if (sample.classes.class[id]<=4) then
		parse ("setmaxhealth "..id.." 80")
		parse ("speedmod "..id.." 5")
		if(hat==0) then
			hat = 3
			if player(id,"team")==2 then
				id1=image("gfx/sOmEtHiNg/Medic_CT.png",1,1,200+id)
			else
				if player(id,"team")==1 then
					id1=image("gfx/sOmEtHiNg/Medic_T.png",1,1,200+id)
				end
			end
		end
		return "41,82,72,6";
	end
	-- RUNNER
	if (sample.classes.class[id]<=5) then
		parse ("setmaxhealth "..id.." 50")
		parse ("setweapon "..id.." 41")
		parse ("speedmod "..id.." 20")
		if(hat==0) then
			hat = 4
			if player(id,"team")==2 then
				id1=image("gfx/sOmEtHiNg/Runner_CT.png",1,1,200+id)
			else
				if player(id,"team")==1 then
					id1=image("gfx/sOmEtHiNg/Runner_T.png",1,1,200+id)
				end
			end
		end
		return "41,11,53";
	end
	-- ZOMBIE
	if (sample.classes.class[id]<=6) then
		parse ("setmaxhealth "..id.." 250")
		parse ("setweapon "..id.." 78")
		parse ("speedmod "..id.." 10")
		parse ("strip "..id.." 50")
		if(hat==0) then
			hat = 5
			if player(id,"team")==2 then
				id1=image("gfx/sOmEtHiNg/Zombie_CT.png",1,1,200+id)
			else
				if player(id,"team")==1 then
					id1=image("gfx/sOmEtHiNg/Zombie_T.png",1,1,200+id)
				end
			end
		end
		return "41,78,86";
	end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview