English Flare Turrent necessity.

9 replies
Goto Page
To the start Previous 1 Next To the start
05.12.17 05:54:36 pm
Up
Spy-eR
User
Offline Off
Hello Guys,

I need a script that it eventually happens when we Throw a Flare there was made a Turrent with 2 machine guns.

As you know this script is using in Fws.Jail,
Same i need it
Anybody knows about it

Moderators Please make it For me,

Thanks fot attension
FRiendly boYy.
05.12.17 06:14:15 pm
Up
Gaiyos
Security Supporter
Offline Off
The turret is spawned at flare possition drop?
IMG:http://i.imgur.com/YFN2ICK.png
IMG:http://i.imgur.com/TCHCwEk.png
IMG:http://i.imgur.com/i2Kif0O.png
05.12.17 06:58:07 pm
Up
Spy-eR
User
Offline Off
Yes !, You're Right

Can you help me ???
FRiendly boYy.
05.12.17 07:47:28 pm
Up
Bowlinghead
User
Offline Off
Something like this, untested
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
throwsNeeded = 3

addhook("projectile","myBad")
function myBad(id, wpn, x, y)
     if (wpn == 54) then
          if (throwsNeeded > 2) then
               local team = player(id,"team")
               parse("spawnobject 11 "..(x/32)+16.." "..(y/32)+16.." 0 0 "..team.." "..id)
               throwsNeeded = 0
          else
               throwsNeeded = throwsNeeded+ 1
          end
     end
end

cs2d cmd spawnobject (missing player id in docs?)
edited 2×, last 06.12.17 06:23:49 pm
Share time limited free games here
06.12.17 06:06:27 pm
Up
Spy-eR
User
Offline Off
Can't working, please another one can help me ?
Please i must needed

Help Moderators please √
FRiendly boYy.
06.12.17 06:17:40 pm
Up
Devil-Thanh
User
Offline Off
Code:
1
2
3
4
5
6
7
addhook("projectile","aaa")
function aaa(id, wpn, x, y)
     if (wpn == 54) then
          local team = player(id,"team")
          parse("spawnobject 11 "..math.floor(x/32).." "..math.floor(y/32).." 0 0 "..team.." "..id)
     end
end
06.12.17 06:24:47 pm
Up
Masea
Super User
Offline Off
user Spy-eR has written:
Help Moderators please √
And why the fuck moderators? They are not here to help you at Lua/scripting. I mean, they may help but don't have to.
Create and design your GUI easy and fast: file cs2d GUI Framework (v2) (11) | Go deep of the darkness and try your intrepidity: file cs2d Outlast 2 Modification (25)
07.12.17 08:20:51 am
Up
Talented Doge
User
Offline Off
The correct coordinates are (X-16)/32 and (Y-16)/32 because it was converted with X*32+16 and Y*32+16:
Code:
1
2
3
4
5
6
7
addhook("projectile", "_p")
function _p(id, wpn, x, y)
     if (wpn == 54) then
        local team = player(id, "team")
        parse("spawnobject 11 "..((x-16)/32).." "..((y-16)/32).." 0 0 "..team.." "..id)
    end
end
07.12.17 09:49:01 am
Up
Spy-eR
User
Offline Off
Hey Thanks alot you guys,

But it has some bugs not big,

When i throw it So There Build Dual turret but not at flare position(At Falre Upper) its build flare drop near position

You can edit it,

And lastly as u know if you play Fws Jail,
So when we throw flare so then make dual turret his upper and then we break turret so its blow Flare another

What we can do much for improve it,
Sorry for Trouble

By the way its Very Useful

Thanks for attension
FRiendly boYy.
07.12.17 09:53:46 am
Up
Gaiyos
Security Supporter
Offline Off
Use it guys. I don't have time to write full script.
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
local misc = {}

function misc.pixel_to_tile(pixel)
     return misc.round((pixel-16)/32)
end

function misc.round(num,base)
     if base == nil then
          return math.floor(num+0.5)
     else
        if base > 0 then
            base = math.pow(10,base)
        end
          return math.floor((num*base)+0.5)/base
     end
end
IMG:http://i.imgur.com/YFN2ICK.png
IMG:http://i.imgur.com/TCHCwEk.png
IMG:http://i.imgur.com/i2Kif0O.png
To the start Previous 1 Next To the start