Forum

> > CS2D > Scripts > Sirent Zombie
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Sirent Zombie

4 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Sirent Zombie

_Vava_
User Off Offline

Zitieren
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

alt Re: Sirent Zombie

Baloon
GAME BANNED Off Offline

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

alt Re: Sirent Zombie

Yates
Reviewer Off Offline

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

alt Re: Sirent Zombie

_Vava_
User Off Offline

Zitieren
user Baloon hat geschrieben
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
Zitat
if player(i,"health")>10 then

alt Re: Sirent Zombie

sonkii
User Off Offline

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


PS:I laughed till im out of ass because of zombie name.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht