Forum

> > CS2D > Scripts > how?
Forums overviewCS2D overview Scripts overviewLog in to reply

English how?

1 reply
To the start Previous 1 Next To the start

old how?

GooDCaT
User Off Offline

Quote
How to create a script to kill with flashbang
help me please

old Re: how?

sheeL
User Off Offline

Quote
user GooDCaT has written
How to create a script to kill with flashbang
help me please


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
addhook('projectile', 'OnProjecTile')
function OnProjecTile(id, wpn, x, y)
     if wpn == 52 then
          local team = player(id, 'team')
          local tablex = 'tableliving'
          if team == 1 then
               tablex = 'team2living'
          elseif team == 2 then
               tablex = 'team1living'
          end
          
          for _, v in pairs(player(0, tablex)) do
               local px = player(v, 'x')
               local py = player(v, 'y')
               
               if px >= (x - 320) and px <= (x + 320) and py >= (y - 240) and py <= (y + 240) then
                    parse(string.format('customkill %s Flashed %s', id, v))
               end
          end
     end
end

Works
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview