Forum

> > CS2D > General > armour still on
Forums overviewCS2D overviewGeneral overviewLog in to reply

English armour still on

12 replies
To the start Previous 1 Next To the start

old armour still on

EnderCrypt
User Off Offline

Quote
i need some help. when a map restart the armour still on , anyone now how to get it to not be on when restarted

old Re: armour still on

DC
Admin Off Offline

Quote
how did you "restart" your map?

try "sv_restart" in the console. this should remove all armors. or maybe you have a Lua script loaded which equips all players with armors. In this case a restart doesn't help to remove the armor of course..

old Re: armour still on

DC
Admin Off Offline

Quote
it's normal that you keep all the weapons and your equipment then.

there is no setting to change that. however a Lua script could do the job too.
edited 1×, last 11.04.09 06:13:31 pm

old Re: armour still on

ohaz
User Off Offline

Quote
this is when winning round. then all things will NOT be stripped (it's better like this)

old Re: armour still on

EnderCrypt
User Off Offline

Quote
ok, im using remove all weapon in begining so they are not whit

can someone make lua script plz

old Re: armour still on

Night Till Death
User Off Offline

Quote
i dont understand how to use lua scripts...it too hard... can someone make a video plz? it will realy help people to understand

old Re: armour still on

ohaz
User Off Offline

Quote
i learned it by just reading the samples. it's the easiest way.
a little help:
everything begins with
1
addhook("hook","a name chosen by you")
where hook is an action you can read in info.txt ( like die, say, kill...) and a name chosen by you is a name you chose, e.g. NTD_say, this would look like this:
1
addhook("say","NTD_say")
then, there is the function
1
function NTD_say(player,text)
<< here are some parameters, you can read them in info.txt. Important is not how you call them, but the order in which you write them. the same function could look like this:
1
function NTD_say(id,txt)
now you have two variables given, id and txt in the second one. ID tells you the id of the player who wrote, txt tells you what he wrote.
You could also call it:
1
function NTD_say(txt, id)
but now, the txt variable would be the players id and the id variable would be the text he said! so now, back to:
1
function NTD_say(id, txt)
we can now make a simple script:
1
if (txt == "!m4a1") then
<< if the text a player says is !m4a1 then:
1
parse("equip "..id.." 32")
parse is the command to run commands which are already included in cs2d.
equip is the command to give a player something.
then, with .. you tell lua that a variable will follow, ID, after it, you tell lua with .. that the text will go on. After that there is the weaponID of the m4a1.
now, the rest of the script:
1
2
end
end
we need 2 ends, one for the if and one for the function.
all in all, this script would look like this:
1
2
3
4
5
6
addhook("say","NTD_say")
function NTD_say(id,txt)
	if(txt=="!m4a1") then
		parse("equip "..id.." 32")
	end
end

old Re: armour still on

DC
Admin Off Offline

Quote
don't write in capital letters. it makes you look like an idiot (and will lead to a ban if you continue). thank you.
edited 1×, last 13.04.09 12:03:51 am

old Re: armour still on

Night Till Death
User Off Offline

Quote
i didnt understand a single thing im too stupid plz make a video

Edit: i read the whole damn thing 9 times and i still dont get it! all i know is 2 thing /equip /setarmor /setmaxhealth /setpos thats it...thats all i know all rest i dont even understand!

old Re: armour still on

New Rex
User Off Offline

Quote
NTD has written
i didnt understand a single thing im too stupid plz make a video

Edit: i read the whole damn thing 9 times and i still dont get it! all i know is 2 thing /equip /setarmor /setmaxhealth /setpos thats it...thats all i know all rest i dont even understand!


I have the same exact problem!

old Re: armour still on

DC
Admin Off Offline

Quote
a video about that would be so unbelievable pointless!

• open and read sys/lua/info.txt
• google for a Lua tutorial and read it
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview