Forum

> > CS2D > Scripts > UserLevel spawn with
Forums overviewCS2D overview Scripts overviewLog in to reply

English UserLevel spawn with

4 replies
To the start Previous 1 Next To the start

old UserLevel spawn with

Bobakrome
User Off Offline

Quote
1
if userlevel[id]==1 then

Spawn with : Medic armor , p228 , shield , m4a1 , chainsaw
(82,4,41,32,85)

1
if userlevel[id]==2 then

Spawn with : Medic armor , chainsaw
(82,32)

i need just a hook & function no other!

old Re: UserLevel spawn with

Apache uwu
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
--assuming userlevel[1-32] are all declared
addhook("spawn","_spawn")

function _spawn(id)
	if userlevel[id]==1 then
		return "82,4,41,32,85"
	elseif userlevel[id]==2 then
		return "82,32"
	end
end

Edit, opps forgot quotes around 82 and 32, added them in.

Think that works, untested though.
edited 1×, last 03.01.12 10:33:13 pm

old Re: UserLevel spawn with

EP
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
function sq(id,w)
parse("equip "..id.." "..w)
end

addhook("spawn","spawnlvl")
function spawnlvl(id)
	if userlevel[id]==1 then
		sq(id,82) sq(id,4) sq(id,41) sq(id,32) sq(id,85)
	elseif userlevel[id]==2 then
		sq(id,82) sq(id,32)	
	end		
end
edited 1×, last 03.01.12 10:33:06 pm

old Re: UserLevel spawn with

Anti-Grav
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
addhook("spawn", "checklevel")
addhook("join", "givelevel")

userlevel = {}

function checklevel(id)
if userlevel[id] == 1 then
return item ids with ,
else if userlevel[id] == 2 then
return item ids with ,
-- and so on
end
end

function givelevel(id)
userlevel[id] = 1
end

*Not tested*

Edit:

tooo late.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview