Computerguy419
Forum
CS2D Scripts Strip on TeleportStrip on Teleport
8 replies 1
Computerguy419
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
stripSpots={} for x,y in pairs(entitylist()) do 	if entity(x,y,"name")=="tel" then 		stripSpots[x.." "..y]=true 	end end addhook("movetile","_movetile") function _movetile(id,x,y) 	if stripSpots[x.." "..y] then 		for _,wpn in pairs(playerweapons(id)) do 			parse("strip "..id.." "..wpn) 		end 	end end
By the way: You can't strip knife, wrench, bomb, etc.
stripSpots={}
for x,y in pairs(entitylist()) do
if entity(x,y,"name")=="tel" then
stripSpots[x.." "..y]=true
end
end
addhook("movetile","cpuguy.movetile")
function cpuguy.movetile(id,x,y)
if stripSpots[x.." "..y] then
for _,wpn in pairs(playerweapons(id)) do
parse("strip "..id.." "..wpn)
end
end
end
Here is my other codes
addhook("buildattempt","cpuguy.FUBuild")
addhook("objectupgrade","cpuguy.FUpgrade")
function cpuguy.FUBuild(p,t,x,y,i)
if t==20 or t==21 then
return 0
end
parse('spawnobject '..t..' '..x..' '..y..' 0 0 '..player(p,"team")..' '..p)
return 1
end
function cpuguy.FUpgrade(i,p,g,t)
t=object(i,"type")
if t==1 then t=3
elseif t==3 then t=4
elseif t==4 then t=5
elseif t==8 then t=11
elseif t==11 then t=12
elseif t==9 then t=15 end
n=player(p,"team")
x=object(i,"tilex")
y=object(i,"tiley")
r=object(i,"rot")
m=object(i,"mode")
d=object(i,"player")
parse("killobject "..i)
parse("spawnobject "..t.." "..x.." "..y.." "..r.." "..m.." "..n.." "..p)
return 1
end
1