Forum
Scripts
Strip Players when round start
Strip Players when round start
16 replies
1

1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
function WeaponStrip(mode)
local Plexist = player(id, 'exists')
if ( Plexist ) then
parse('strip ' .. id)
end
end
addhook('startround', 'WeaponStrip')
strip.
startround doesnt have id so you have to use a loop.
Bowlinghead:Use this for id :
1
2
3
4
2
3
4
local playerlist=player(0,"table") for _,id in pairs(playerlist) do print(player(id,"name")) end
Bowlinghead: Ha, I just noticed that! Oops...
1
2
3
4
5
6
7
2
3
4
5
6
7
function WeaponStrip(mode)
for _, id in pairs(0, 'tableliving') do
parse('strip ' .. id)
end
end
addhook('startround', 'WeaponStrip')
idhas now a value anyway. Sorry for the mistake,
Jedediastwo! for _, id in pairs(0, 'tableliving') do
change it to
for _, id in pairs(player(0, 'tableliving')) do
@
Jedediastwo: Change the loop (the 2 line) from the code with for _, id in pairs( player(0, 'tableliving') ) do.

btw via lua is not just parse("strip "..id). you need to type which weapon needed to strip, because this command is not recognize a number(simply bcs u not type it lel).
GeoB99 has written1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
function WeaponStrip(mode)
local Plexist = player(id, 'exists')
if ( Plexist ) then
parse('strip ' .. id)
end
end
addhook('startround', 'WeaponStrip')
strip.a question . what is mode in weopenstrip function ?
startroundI wrote this for you, cuz u wont do it yourself i think:
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
addhook('startround', 'WeaponStrip')
function WeaponStrip(mode)
	for _,id in pairs(player(0, 'tableliving')) do
local itemlist=playerweapons(id)
		for _,s in pairs(itemlist) do
			if s~=50 then
				parse("strip "..id.." "..s)
			end
		end
	end
end
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook("startround","weaponStrip")
Items={} --Items You want to strip--
function weaponStrip()
	parse("strip "..id..""..Items)
end
baRD: It'll fail because idis undeclared in your code hence nil.
1

Offline