Forum




Strip Players when round start
16 replies



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')



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


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,

for _, id in pairs(0, 'tableliving') do
change it to
for _, id in pairs(player(0, 'tableliving')) do

@

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).

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')

a question . what is mode in weopenstrip function ?

I 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

idis undeclared in your code hence nil.



