Forum

> > CS2D > Scripts > Flare Turrent necessity.
Forums overviewCS2D overview Scripts overviewLog in to reply

English Flare Turrent necessity.

9 replies
To the start Previous 1 Next To the start

old Flare Turrent necessity.

Man Of Steel
User Off Offline

Quote
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

old Re: Flare Turrent necessity.

Bowlinghead
User Off Offline

Quote
Something like this, untested
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

old Can't working,

Man Of Steel
User Off Offline

Quote
Can't working, please another one can help me ?
Please i must needed

Help Moderators please √

old Re: Flare Turrent necessity.

Devil-Thanh
GAME BANNED Off Offline

Quote
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

old Re: Flare Turrent necessity.

Masea
Super User Off Offline

Quote
user Man Of Steel 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.

old Re: Flare Turrent necessity.

Talented Doge
User Off Offline

Quote
The correct coordinates are (X-16)/32 and (Y-16)/32 because it was converted with X*32+16 and Y*32+16:
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

old Thanks Alot, but Some bigs :)

Man Of Steel
User Off Offline

Quote
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

old Re: Flare Turrent necessity.

Gaios
Reviewer Off Offline

Quote
Use it guys. I don't have time to write full script.
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
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview