Forum

> > CS2D > Scripts > Functions for teams
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Functions for teams

10 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Functions for teams

superpegamento
User Off Offline

Zitieren
First, hello to all

Ok, what I need is really easy, just do not remember the code, I need to spawn with the terrorists have 250HP and CT no take Super Armor.
Thanks in advance

Sorry for my english

alt Re: Functions for teams

Rainoth
Moderator Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
addhook("spawn","eh")
function eh(id)
	if player(id,"team")==1 then
		parse("setmaxhealth "..id.." 250")
	end
end

addhook("walkover","col")
function col(id,iid)
	if (player(id,"team")==2 or player(id,"team")==3) and iid == 83 then
		return 1
	end
end

alt Re: Functions for teams

Avo
User Off Offline

Zitieren
@user Rainoth:
1
2
3
4
5
6
addhook("walkover","col")
function col(id, iid, typ)
     if player(id, "team")>=2 and typ == 83 then
          return 1
     end
end
iid isn't a type-id of an item.

alt Re: Functions for teams

superpegamento
User Off Offline

Zitieren
user Avo hat geschrieben
@user Rainoth:
1
2
3
4
5
6
addhook("walkover","col")
function col(id, iid, typ)
     if player(id, "team")>=2 and typ == 83 then
          return 1
     end
end
iid isn't a type-id of an item.


thanks, how are blocked over 1?

alt Re: Functions for teams

Rainoth
Moderator Off Offline

Zitieren
Sorry, I understand only English,Lithuanian and a bit German , you should rephrase it better...

alt Re: Functions for teams

superpegamento
User Off Offline

Zitieren
user Rainoth hat geschrieben
Sorry, I understand only English,Lithuanian and a bit German , you should rephrase it better...


mm, no take others items, besides super armor

would need that can not grab super armor and firearms

alt Re: Functions for teams

Rainoth
Moderator Off Offline

Zitieren
What you say contradicts.
"No take other items besides super armor"
> Can take only super armor
"Cannot grab super armor and firearms"
> Can't take super armor

Either explain more detailed (cause I'm suspecting what you mean is team-based picking but I don't know how based) or make up your mind.

alt Re: Functions for teams

Rainoth
Moderator Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
weps = {45,46,47,48,49,83}
addhook("walkover","cantpick")
function cantpick(id,iid,type)
	for k,v in pairs(weps) do
		if type == v then
			return 1
		end
	end
end

This ? Just write item IDs that can't be picked by anyone.

alt Re: Functions for teams

Dousea
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
local hooks = {"spawn"; "walkover"}
for _, hook in pairs(hooks) do
	addhook(hook, hook .. "hook")
end

function spawnhook (id)
	if (player(id, "team") == 1) then
		parse("setmaxhealth " .. id .. " 250")
	end
end

function walkoverhook (id, iid, type)
	local items = {45; 46; 47; 48; 49; 83}
	if (player(id, "team") >= 2) then
		for _, item in pairs(items) do
			if (type == item) then
				return 1
			end
		end
	end
end
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht