Forum

> > CS2D > Scripts > Lua Scripts/Questions/Help
Forums overviewCS2D overview Scripts overviewLog in to reply

English Lua Scripts/Questions/Help

6,770 replies
Page
To the start Previous 1 275 76 77338 339 Next To the start

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
@JaBoo,
It's not possible to add wall with command. Atleast in current CS2D version.
But I think there is possible to activate dyn_wall with trigers.

old Re: Lua Scripts/Questions/Help

NozliW
User Off Offline

Quote
@Blazzingxx
JaBoo meant buildable walls and i know that's possible i had messed on [LaG]Roll-the-dice server about 1 hour today.
what he wants maybe it's that some walls spawn in certain spots or in random spots.
but i don't know how to do that (i don't know too much :S)

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
@-WiLSoN- & JaBoo
It's not walls, but buildings.
You can make it by using console command.
spawnobject

old Re: Lua Scripts/Questions/Help

JaBoo
User Off Offline

Quote
Blazzingxx has written
@-WiLSoN- & JaBoo
It's not walls, but buildings.
You can make it by using console command.
spawnobject

I want it to spawn in random location however. And not just 1, many of them

old Naruto mod

bebenek
User Off Offline

Quote
I create naruto mod and i have problem...
I working in naruto transform to kiyubi and it's not working
How to get naruto transform      if you kill 30 people.
Who's help me??
This That Script

     

if sdz==nil then sdz={} end
sdz.classes={}

----------------------------------------------------------------------------------------------------

function initArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
sdz.classes.classt=initArray(32)
sdz.classes.classct=initArray(32)
function sdz.classes.classmenut(id)
menu(id,"Select your Player,Naruto,Sasuke,Sakura,Kakashi")
end

function sdz.classes.classmenuct(id)
menu(id,"Select your Player,Naruto,Sasuke,Sakura,Kakashi")
end

----------------------------------------------------------------------------------------------------

addhook("team","sdz.classes.team")
function sdz.classes.team(id,team)
if (team==1) then
sdz.classes.classmenut(id)
elseif (team==2) then
sdz.classes.classmenuct(id)
end
end


----------------------------------------------------------------------------------------------------

addhook("menu","sdz.classes.menu")
function sdz.classes.menu(id,menu,sel)
if (menu=="Select your Player") then
if (sel>=0 and sel<=4) then
sdz.classes.classt[id]=sel
if (player(id,"health")>0) then
parse("killplayer "..id)
end
end
elseif (menu=="Select your Player") then
if (sel>=0 and sel<=4) then
sdz.classes.classct[id]=sel
if (player(id,"health")>0) then
parse("killplayer "..id)
end
end
end
end

----------------------------------------------------------------------------------------------------

addhook("spawn","sdz.classes.spawn")
function sdz.classes.spawn(id)



-- NARUTO
if (sdz.classes.classt[id]==1) then
parse ("setmaxhealth "..id.." 120")
parse ("speedmod "..id.." 20")
parse ("equip "..id.." 53")
parse ("equip "..id.." 51")
parse ("equip "..id.." 32")
parse('hudtxt2 '..id..' 5 "©255255255=== Speed 20 " 3 180 0')
parse('hudtxt2 '..id..' 7 "©163079225=== Class Naruto" 3 220 0')
parse('hudtxt2 '..id..' 9 "©111172100=== Transform : Yes" 3 260 0')
return "";
end
-- SASUKE
if (sdz.classes.classt[id]==2) then
parse ("setmaxhealth "..id.." 120")
parse ("speedmod "..id.." 15")
parse ("equip "..id.." 73")
parse ("equip "..id.." 51")
parse ("equip "..id.." 46")
parse('hudtxt2 '..id..' 5 "©255255255=== Speed 15 " 3 180 0')
parse('hudtxt2 '..id..' 7 "©163079225=== Class Sasuke" 3 220 0')
parse('hudtxt2 '..id..' 9 "©111172100=== Transform : Yes" 3 260 0')

end
-- SAKURA
if (sdz.classes.classt[id]==3) then
parse ("setmaxhealth "..id.." 200")
parse ("speedmod "..id.." 5")
parse ("equip "..id.." 82")
parse ("equip "..id.." 51")
parse ("equip "..id.." 21")
parse('hudtxt2 '..id..' 5 "©255255255=== Speed 5 " 3 180 0')
parse('hudtxt2 '..id..' 7 "©163079225=== Class Sakura" 3 220 0')
parse('hudtxt2 '..id..' 9 "©111172100=== Transform : No" 3 260 0')
return "x";
end
-- KAKASHI
if (sdz.classes.classt[id]==4) then
parse ("setmaxhealth "..id.." 130")
parse ("setarmor "..id.." 25")
parse ("speedmod "..id.." 60")
parse ("equip "..id.." 7")
parse ("equip "..id.." 51")
parse ("equip "..id.." 53")
parse ("equip "..id.." 52")
parse ("equip "..id.." 72")
parse('hudtxt2 '..id..' 5 "©255255255=== Speed 60 " 3 180 0')
parse('hudtxt2 '..id..' 7 "©163079225=== Class Kakashi" 3 220 0')
parse('hudtxt2 '..id..' 9 "©111172100=== Transform : No" 3 260 0')
return "73";
end

-- NARUTO
if (sdz.classes.classct[id]==1) then
parse ("setmaxhealth "..id.." 120")
parse ("speedmod "..id.." 20")
parse ("equip "..id.." 53")
parse ("equip "..id.." 51")
parse ("equip "..id.." 32")
parse('hudtxt2 '..id..' 5 "©255255255=== Speed 20 " 3 180 0')
parse('hudtxt2 '..id..' 7 "©163079225=== Health 120" 3 220 0')
parse('hudtxt2 '..id..' 9 "©111172100=== Transform : Yes" 3 260 0')
return "38,23,4,72";
end
-- SASUKE
if (sdz.classes.classct[id]==2) then
parse ("setmaxhealth "..id.." 120")
parse ("speedmod "..id.." 15")
parse ("equip "..id.." 73")
parse ("equip "..id.." 51")
parse ("equip "..id.." 46")
parse('hudtxt2 '..id..' 5 "©255255255=== Speed 15 " 3 180 0')
parse('hudtxt2 '..id..' 7 "©163079225=== Class Sasuke" 3 220 0')
parse('hudtxt2 '..id..' 9 "©111172100=== Transform : No" 3 260 0')
return "10,31,3,51";
end
-- SAKURA
if (sdz.classes.classct[id]==3) then
parse ("setmaxhealth "..id.." 200")
parse ("speedmod "..id.." 5")
parse ("equip "..id.." 82")
parse ("equip "..id.." 51")
parse ("equip "..id.." 21")
parse('hudtxt2 '..id..' 5 "©255255255=== Speed 5 " 3 180 0')
parse('hudtxt2 '..id..' 7 "©163079225=== Class Sakura" 3 220 0')
parse('hudtxt2 '..id..' 9 "©111172100=== Transform : No" 3 260 0')
return "5,6,51,52,53,59";
end
-- KAKASHI
if (sdz.classes.classct[id]==4) then
parse ("setmaxhealth "..id.." 80")
parse ("setarmor "..id.." 25")
parse ("speedmod "..id.." 60")
parse ("equip "..id.." 7")
parse ("equip "..id.." 51")
parse ("equip "..id.." 53")
parse ("equip "..id.." 52")
parse ("equip "..id.." 72")
parse('hudtxt2 '..id..' 5 "©255255255=== Speed 60 " 3 180 0')
parse('hudtxt2 '..id..' 7 "©163079225=== Class Kakashi" 3 220 0')
parse('hudtxt2 '..id..' 9 "©111172100=== Transform : No" 3 260 0')
return "46,6,72,73,53";
end
end

----------------------------------------------------------------------------------------------------

addhook("buy","sdz.classes.buy")
function sdz.classes.buy()
return 1
end

----------------------------------------------------------------------------------------------------

addhook("drop","sdz.classes.drop")
function sdz.classes.drop()
return 1
end

----------------------------------------------------------------------------------------------------

addhook("die","sdz.classes.die")
function sdz.classes.die()
return 1
end

----------------------------------------------------------------------------------------------------

old Re: Lua Scripts/Questions/Help

bebenek
User Off Offline

Quote
Transform to kiyubi - Fox of 9 Tails.
If you kill 30 players you transform to Fox of 9 Tails.
-Have Speedmod 100,Claws,SuperArm,250hp,and if you not wallking hp is regenerate.
edited 1×, last 01.11.09 08:39:28 am

old Re: Lua Scripts/Questions/Help

NozliW
User Off Offline

Quote
what's the hudtxt2 "objective" ?
and how it's used ?
(for example)
Spoiler >

thanks
Also is it possible to strip a weapon and give it back 15 secs later ?if it isn't possible what about in 1 min ?
more thanks
edited 1×, last 01.11.09 06:23:54 am

old Re: Lua Scripts/Questions/Help

NozliW
User Off Offline

Quote
maybe something like this ?
Spoiler >

old Re: Lua Scripts/Questions/Help

Admir
User Off Offline

Quote
maybe something like this, i didn't test it.

1
2
3
4
5
6
7
8
addhook("spawn","sspawn")
function sspawn(id)
team = player(id,"team")
	if (team > 0 ) then
		parse("equip "..id.." 69")
		parse("strip "..id.." 50")
	end
end

old Re: Lua Scripts/Questions/Help

DC
Admin Off Offline

Quote
there are several time hooks. hook second for example. so it is possible, yes (however you will have full ammo when getting it back).

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
DC has written
(however you will have full ammo when getting it back).

There should be command to set player ammo.
1
setammo id <weapon> <ammoin>

Would be enough.

Admin/mod comment

this is not a suggestion thread moreover this already has been suggested. /DC

old Re: Lua Scripts/Questions/Help

NozliW
User Off Offline

Quote
but is it possible to "link" the attack hook and the second hook so when you shoot 1 bullet with X weapon then it heals you(or the hit player if it's on your same team) then strips it and returns it to you after 15 secs.
it'd be something like this(not ended) right ?
1
2
3
4
5
6
7
8
addhook("attack";"a")
addhook("second","sec")
addhook("hit","h")
function a(id,weapon)
	if (weapon == X) then
		parse("sethealth "..id.." "..(player(id,"health")+20))
		parse("strip "..id.." "..weapon)
	end
what else (also am i wrong ?)
oh and when typing this idea came to my mind:
is it possible to make something like this:
Spoiler >
To the start Previous 1 275 76 77338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview