Forum

> > CS2D > Scripts > Airstrike script help
Forums overviewCS2D overview Scripts overviewLog in to reply

English Airstrike script help

5 replies
To the start Previous 1 Next To the start

old Airstrike script help

J4x
User Off Offline

Quote
Hi guys, I'm making a airstrike script, I want to make something like when I have 10 kills then i can put a mark on the floor, and then when i say objective ready it explodes, but the problem is that i dont how make an explsion where i left the mark. Thx for your help.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
-------------------
*Made by: FN_Linkin Park
*Date:  7/2/11
*Dont copy/Steal or edit this script
-------------------

addhook("say","air")
function air(id,text)
if (text=="I need help")then
if player(id,"score") == 10
msg2(id,"You recieved an airstrike")
msg2(id,"press f2 to mark your objective")
msg2(id,"Say objective ready to destroy your objective")
end
end

addhook("serveraction","boom")
function boom(id,action)
if action == 1 then
freeimage(id)id1=image("gfx/weapons/bomb.bmp",player(id,"x"),player(id,"y"),0)
imagescale(id1,1,1)
imageblend(id1,0)
imagealpha(id1,1.0)
end
end

addhook("say","ready")
function ready(id,text)
if(text=="objective ready") then <-- i dont know what else O_o
edited 1×, last 08.02.11 03:36:14 pm

old Re: Airstrike script help

DannyDeth
User Off Offline

Quote
Well, a simpler one would go like this:
1
2
3
4
5
6
7
8
addhook("say","airstrike_give")
function airstrike_give(id,txt)
	if txt="I need help" and player(id,"score")>=10 then
		parse("equip "..id.." 76")
		msg2(id,"©255255255You get an airstrike :D Throw it smewhere to DESTROY everything ^^")
		return 1
	end
end
Hows that for simple, heh?

old Re: Airstrike script help

J4x
User Off Offline

Quote
Waht your script do, is to give me an airstrike, what i like to do, is something like i put a mark on the florr and then it explodes..
edited 1×, last 08.02.11 04:22:16 pm

old Re: Airstrike script help

Yasday
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
for pl = 1,32 do
img[pl] = {x = 0,y = 0,i = 0}
end
addhook("say","air")
function air(id,text)
if (text=="I need help")then
if player(id,"score") == 10
msg2(id,"You recieved an airstrike")
msg2(id,"press f2 to mark your objective")
msg2(id,"Say objective ready to destroy your objective")
end
end

addhook("serveraction","boom")
function boom(id,action)
if action == 1 then
freeimage(img[id].i)
local x,y = player(id,"x"),player(id,"y")
img[id].i=image("gfx/weapons/bomb.bmp",x,y,0)
img[id].x = x
img[id].y = y
end
end

addhook("say","ready")
function ready(id,text)
if(text=="objective ready") then
parse([[explosion ]]..img[id].x..[[ ]]..img[id].y..[[ 1 1 ]]..id)
end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview