Forum

> > CS2D > Scripts > Bring Player when throw Gut--
Forums overviewCS2D overview Scripts overviewLog in to reply

English Bring Player when throw Gut--

8 replies
To the start Previous 1 Next To the start

old Bring Player when throw Gut--

Man Of Steel OP
User Off Offline

Quote
Hello Everyone,

I Have no time to spent learn lua for my server usable scripts,So i always demand for that.

I Thought That whenever player has dead, You can bring your cronies for use !bring <id> of command, Bet that you have a gut bomb for bring.

i.e player have gut and he will type !bring <id> and throw it, So according player id he will Bring again but its necessary for having a Gut bomb.

Does it possible, Anybody can make this script for me
Thanks for attension.

old Possible?

Man Of Steel OP
User Off Offline

Quote
...........

Guys you don't understand what i exactly want?

old Re: Bring Player when throw Gut--

Rainoth
Moderator Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
target = {}
addhook("say","_s")
function _s(id,t)
	if t:sub(1,6) == "!bring" and tonumber(t:sub(8,9)) then
		target[id] = tonumber(t:sub(8,9))
	end
end

addhook("projectile","_prj")
function _prj(id,w,x,y)
	if w == 86 then
		if not (player(target[id],"health") > 0) then
			parse("spawnplayer "..target[id].." "..x.." "..y)
		end
	end
end

old Re: Bring Player when throw Gut--

Rainoth
Moderator Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
target = {}
addhook("say","_s")
function _s(id,t)
     if t:sub(1,6) == "!bring" and tonumber(t:sub(8,9)) and player(id,"team")==player(tonumber(t:sub(8,9)),"team") then
          target[id] = tonumber(t:sub(8,9))
     end
end

addhook("projectile","_prj")
function _prj(id,w,x,y)
     if w == 86 then
          if not (player(target[id],"health") > 0) then
               parse("spawnplayer "..target[id].." "..x.." "..y)
          end
     end
end
Adding another condition cause he wrote to me on private message to check if same team.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview