Forum

> > CS2D > Scripts > Good Mod only CT
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Good Mod only CT

11 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Good Mod only CT

maninja
User Off Offline

Zitieren
Hi guys

i want script good mood for CT only For Exmple When someone hits me, I do not die !

Thank you us

alt Re: Good Mod only CT

KingShadow
User Off Offline

Zitieren
he means god mode for ct only

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
gm={}

addhook("serveraction","_serveraction")
addhook("join","_join")
addhook("hit","_hit")


function _join(id)
     gm[id]=false
end


function _serveraction(id,action)
if action==3 then
if player(id,"team")==2 then
if gm[id]==true then
msg2(id,"\169255000000God Mode Disabled")
gm[id]=false
else
gm[id]=true
msg2(id,"\169000255000God Mode Enabled")
end
end
end
end


function _hit(id)
     if gm[id]==true then
          return 1
     end
end
1× editiert, zuletzt 16.07.18 19:44:25

alt Re: Good Mod only CT

Quattro
GAME BANNED Off Offline

Zitieren
This is a much simpler code and is exactly what OP wanted:
1
2
3
4
5
addhook('minute','loop')
function loop()
    msg('©255255255CTs are in a good mood!!!')
    parse('sv_sound "/fun/thats_the_way.wav"')
end

alt Re: Good Mod only CT

_oops
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
good_mood=false

toggle_mood = function(id, b) 
good_mood = good_mood == false and true or false
local text = good_mood  and "\169255255255CTs are in a good mood!!! :D" or "\169200200200CTs are no longer in a good mood...  :("
msg(text) 
end

function loop()
 if good_mood then 
 msg("CTs are in a good mood, yay!! ")
 parse("sv_sound /"fun/thats_the_way/"")
 end
timer(60000,"loop")
end


addhook("serveraction","toggle_mood")
loop()

alt Re: Good Mod only CT

Bowlinghead
User Off Offline

Zitieren
Guys you didnt read carefully enough!
user maninja hat geschrieben
i want script good mood for CT only For Exmple When someone hits me, I do not die !

So I add sth to your code, user _oops :
1
2
3
4
5
6
7
8
9
10
addhook("hit","hit_mood")
function hit_mood(vic,kil,wpn,hpdmg)
	if good_mood then if player(vic,"team")==2 then
		if (hpdmg > player(vic,"health")) then
			msg2(vic,"Im so happy <3")
			msg2(kil,player(vic,"name").."is in a too good mood")
			return 1
		end
	end end
end
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht