Forum
CS2D Scripts Lua Scripts/Questions/HelpHe obviously wants to nazi zombies to play jack-in-the-box, oh, and do it with lua!
YellowBanana has written
Can't you read english?
He obviously wants to nazi zombies to play jack-in-the-box, oh, and do it with lua!
He obviously wants to nazi zombies to play jack-in-the-box, oh, and do it with lua!
No, he is trying to get nazi zombies to script stuff while sitting in the box
why dont working?
Please repair
1
2
3
4
5
6
2
3
4
5
6
addhook("spawn","sample.fast.spawn") function sample.fast.spawn(p) if (hit == 1) then parse("enny_knock = 4") end end
enny_knock ?
no known command...
and why is this in a spawn hook!?
you know you have to put this in a "hit hook"...
" if (hit == 1) then "
hit?
undefined variable...
1
2
3
4
5
6
2
3
4
5
6
addhook("hit","sample.fast.spawn") 	function hit.fast.spawn(p) 	if (hit == 1) then 	parse("enny_knock = 4") 	end end
Here need play random sounds in 2 teams.
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
addhook("endround","sample.ut.ending") function sample.ut.ending() 	if (player(id,"team") == 1) then 	parse("sv_sound \"WarP0rTal/quake/winsounds/rt"..math.random(1,14)..".wav\"") 	sample.ut.fblood=0 end addhook("endround","sample.ut.ending") function sample.ut.ending() 	if (player(id,"team") == 2) then 	parse("sv_sound \"WarP0rTal/quake/winsounds/rct"..math.random(1,14)..".wav\"") 	sample.ut.fblood=0 end
Thank you in advance!
Sunny Autumn has written
No, he is trying to get nazi zombies to script stuff while sitting in the box
YellowBanana has written
Can't you read english?
He obviously wants to nazi zombies to play jack-in-the-box, oh, and do it with lua!
He obviously wants to nazi zombies to play jack-in-the-box, oh, and do it with lua!
No, he is trying to get nazi zombies to script stuff while sitting in the box
yeah but i want to make all 4 maps. that zombie verruckt , shi no numa , der riese and nacht der untoten maps i did already guns with lua
mostly i think there is supposed to be just like from the bet from tibia mod(if u know what i mean xDD)
Here I have two scripts, the first one:
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
weapons={1, 2, 3, 4, 5} addhook("say","adminsay") function adminsay(id,txt) 	if (txt=="!equipall" "..id") and 	player(id,"usgn") == 29595 then 		if _table.weapons then for index_of_weapon,wpn in ipairs(_table.weapons) do parse("equip "..id.." "..wpn) 		end 	end end end
1
2
3
4
5
6
2
3
4
5
6
function adminsay(id,txt) 	if (txt=="!tele" "..id") 	and player(id,"usgn") == 29595 then parse("setpos "..id.." "..x.." "..y.." ") 	end end
1.The first one: I need it to when the admin says !equipall <id>, he gives a player(or himself) all the weapons.
2.The second one: Well, what can I say about this? Isn't finished yet. But it's purpose is to teleport a player on the admin's position.
Please help.
PS: Sorry for the messy script, I couldn't get the usgn part in one line.
redefinder has written
Hello all!
Here I have two scripts, the first one:
Second one:
Now I'll start explaining them.
1.The first one: I need it to when the admin says !equipall <id>, he gives a player(or himself) all the weapons.
2.The second one: Well, what can I say about this? Isn't finished yet. But it's purpose is to teleport a player on the admin's position.
Please help.
PS: Sorry for the messy script, I couldn't get the usgn part in one line.
Here I have two scripts, the first one:
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
weapons={1, 2, 3, 4, 5} addhook("say","adminsay") function adminsay(id,txt) 	if (txt=="!equipall" "..id") and 	player(id,"usgn") == 29595 then 		if _table.weapons then for index_of_weapon,wpn in ipairs(_table.weapons) do parse("equip "..id.." "..wpn) 		end 	end end end
1
2
3
4
5
6
2
3
4
5
6
function adminsay(id,txt) 	if (txt=="!tele" "..id") 	and player(id,"usgn") == 29595 then parse("setpos "..id.." "..x.." "..y.." ") 	end end
1.The first one: I need it to when the admin says !equipall <id>, he gives a player(or himself) all the weapons.
2.The second one: Well, what can I say about this? Isn't finished yet. But it's purpose is to teleport a player on the admin's position.
Please help.
PS: Sorry for the messy script, I couldn't get the usgn part in one line.
I'm baffled with all the errors in the script...
this is how to concatenate strings:
1
a = "hello ".."world"
so..
1
2
3
4
5
2
3
4
5
function adminsay(id,txt) 	if(txt=="!tele" and player(id,"usgn")==29595) then parse(string.format("setpos %i %i %i",id,x,y)) end end
and the second one:
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
weapons={1, 2, 3, 4, 5} addhook("say","adminsay") function adminsay(id,txt) if (txt=="!equipall" and player(id,"usgn") == 29595) then for i,wpn in ipairs(weapons) do parse("equip "..id.." "..wpn) end end end
This is just for giving himself stuff tho..
If you wanna catch the id from the txt, u'll have to use some kind of substring function, or the string libraries by leegao.
My question is how to add more car with simple steps?
But i cant get it to work
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--Weapons-- addhook("projectile","hnsteam_smokecus") function hnsteam_smokecus(id,weapon,x,y) if (weapon==53) then 		parse('effect "colorsmoke" ' ..x.. ' ' ..y.. ' 140 96 0 0 128') 		parse('effect "colorsmoke" ' ..x.. ' ' ..y.. ' 140 96 0 0 128') 		return 1 	end end addhook("hit","hnsteam_smokefreeze") function hnsteam_freeze(target,weapon) if (weapon==53) then 		parse("speedmod "..target.." -100") 		return 1 	end end
Thanks
function sages(id,txt)
if txt=="menu" then
menu (id,"hallo,hello,moin,huhu")
end
end
this creates a simple menu...
addhook ("menu","meno")
function meno(id,menu,sel)
if menu=="hallo" then
if sel==1 then
msg ("yeah sel1!")
elseif sel==2 then
msg ("yeah sel2!")
elseif sel>=3 and sel<=9 then
msg ("between 3 and 9!")
end
end
end