Forum

> > CS2D > Scripts > Sirent Zombie
Forums overviewCS2D overview Scripts overviewLog in to reply

English Sirent Zombie

4 replies
To the start Previous 1 Next To the start

old Sirent Zombie

_Vava_
User Off Offline

Quote
Hi all i want to make new zombie class
How to make the screamers by starkkz chase you, with his horror image come out and kill you in very near distance

old Re: Sirent Zombie

Baloon
GAME BANNED Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook("move","_mv")
function _mv(id,x,y)
 for i=1,32 do if player(i,"exists") and player(id,"team")~=player(i,"team") and player(i,"health")>0 then
  local x2,y2=player(i,"x"),player(i,"y")
  local dist=math.sqrt((x2-x)^2 + (y2-y)^2)
  if dist < 80 then
   if player(i,"health")<=10 then
    parse("sethealth "..i.." "..player(i,"health")-(10))
   else 
    parse("customkill "..id.." scare "..i)
    end
   end
  end
 end
end
Without image, not tested yet.

old Re: Sirent Zombie

Yates
Reviewer Off Offline

Quote
@user Baloon: Please don't use
for i = 1, 32 do
- Instead, use
for _, i in pairs(player(0, "table")) do

old Re: Sirent Zombie

_Vava_
User Off Offline

Quote
user Baloon has written
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook("move","_mv")
function _mv(id,x,y)
 for i=1,32 do if player(i,"exists") and player(id,"team")~=player(i,"team") and player(i,"health")>0 then
  local x2,y2=player(i,"x"),player(i,"y")
  local dist=math.sqrt((x2-x)^2 + (y2-y)^2)
  if dist < 80 then
   if player(i,"health")<=10 then
    parse("sethealth "..i.." "..player(i,"health")-(10))
   else 
    parse("customkill "..id.." scare "..i)
    end
   end
  end
 end
end
Without image, not tested yet.


at line 7
Quote
if player(i,"health")>10 then

old Re: Sirent Zombie

sonkii
User Off Offline

Quote
@user _Vava_: It was totally fail.Btw,it should be easily configured.


PS:I laughed till im out of ass because of zombie name.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview