Forum

> > CS2D > Scripts > Strip Usp/Glock at start
Forums overviewCS2D overview Scripts overviewLog in to reply

English Strip Usp/Glock at start

10 replies
To the start Previous 1 Next To the start

old Strip Usp/Glock at start

alex72super
User Off Offline

Quote
hello i tried to make a script that removed the usp/glock
when the player started

1
2
3
4
5
6
addhook("spawn","_spawn")
function _spawn(id,type)
 if ("type<=51 and type>=49") then
 return x
	end
end

can you help me fix it?

old Re: Strip Usp/Glock at start

Rainoth
Moderator Off Offline

Quote
1
2
3
4
addhook("spawn","_spawn")
function _spawn(id)
	return "x" -- or parse("strip "..id) will do the same thing either way.
end

old Re: Strip Usp/Glock at start

Rainoth
Moderator Off Offline

Quote
Quote
why not just put noweapons entity in map


Because it's easier to write 4 lines than put an entity for every map you're playing

old Strip

IRAN TOWN
User Off Offline

Quote
user alex72super has written
hello i tried to make a script that removed the usp/glock

You can use this lua script.

1
2
3
4
5
6
7
8
addhook('spawn','spawn_hook')
function spawn_hook(id)
if player(id,'team')==1 then
parse('strip '..id..' 2')
else
parse('strip '..id..' 1')
end
end

old Re: Strip Usp/Glock at start

alex72super
User Off Offline

Quote
user IRAN TOWN has written
user alex72super has written
hello i tried to make a script that removed the usp/glock

You can use this lua script.

1
2
3
4
5
6
7
8
addhook('spawn','spawn_hook')
function spawn_hook(id)
if player(id,'team')==1 then
parse('strip '..id..' 2')
else
parse('strip '..id..' 1')
end
end


Thank you iran but user Rainoth already gave me a code and its more simpler i guess thanks anyway.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview