Forum

> > CS2D > Scripts > Gut Bomb Spawn Changing.
Forums overviewCS2D overview Scripts overviewLog in to reply

English Gut Bomb Spawn Changing.

1 reply
To the start Previous 1 Next To the start

old Gut Bomb Spawn Changing.

Man Of Steel
User Off Offline

Quote
Hi guys i have to ask this script but it has some problem.
Can anybody change it?

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))
          return 1
     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)
               msg(p"©000255127[Server]You have Just Bring a Player")
          end
     end
end



-Player can bring his own team players not opponents teammates.
And Player Who will Revived so he will receive a msg something like "(Player) have Just Revived you"

If player mistakenly Type id of opponents teammate so
Player don't revive and He Receive Message "[Error] You can't Revive Opponents Temmates"

Can anybody change this lua function according as i want?
Please help me.
edited 2×, last 01.05.18 09:42:35 am

old Re: Gut Bomb Spawn Changing.

minos
User Off Offline

Quote
it's easy you need just to search a little bit :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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))
return 1
end
end

addhook("projectile","_prj")
function _prj(id,w,x,y)
if w == 86 then
if not (player(target[id],"health") > 0) and not (player(id,"team") ~= player(target[id],"team")) then
parse("spawnplayer "..target[id].." "..x.." "..y)
msg("©000255127[Server]You have Just Bring a Player")
else
msg2(id,"©255000000[Error] You can't Revive Opponents Temmates")
end
end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview