Forum

> > CS2D > Scripts > Flare Turrent necessity.
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Flare Turrent necessity.

9 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Flare Turrent necessity.

Man Of Steel
User Off Offline

Zitieren
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

alt Re: Flare Turrent necessity.

Bowlinghead
User Off Offline

Zitieren
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?)
2× editiert, zuletzt 06.12.17 18:23:49

alt Can't working,

Man Of Steel
User Off Offline

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

Help Moderators please √

alt Re: Flare Turrent necessity.

Devil-Thanh
GAME BANNED Off Offline

Zitieren
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

alt Re: Flare Turrent necessity.

Masea
Super User Off Offline

Zitieren
user Man Of Steel hat geschrieben
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.

alt Re: Flare Turrent necessity.

Talented Doge
User Off Offline

Zitieren
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

alt Thanks Alot, but Some bigs :)

Man Of Steel
User Off Offline

Zitieren
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

alt Re: Flare Turrent necessity.

Gaios
Reviewer Off Offline

Zitieren
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht