(i try to think more in the future )
Forum
CS2D Scripts Lua Scripts/Questions/Help(i try to think more in the future )
Lua scripts are spesific to cs2d?
What does lua stand for? is it an acrenem?(for give me crapy spelling)
Quote
...The name comes from the Portuguese word lua meaning "moon"...
Lua means moon...
1
if (player(txt2,"health") == 0) then
If txt2 is string, it will get errored.
So it needs to check is it integer like this
1
if (checkint(txt2)) then
I need a function to check it. Please help
edited 2×, last 02.06.09 08:38:17 am
1
tonumber(txt2)
it doesn't check if it is number, it just makes the string a number
TheKilledDeath has written should help.
it doesn't check if it is number, it just makes the string a number
1
tonumber(txt2)
it doesn't check if it is number, it just makes the string a number
Thanks, but it return nil..
That should work:
1
2
2
txt2 = tonumber(txt2) if (txt2==nil) then return 1; end
And thanks again, you helped me a lot.
Edit: problem again =D
1
if (player(i,"health") > 0 and player(i, "favteam")==1) then
"attempt to compare number with boolean".
So I need help with getting player team.
edited 1×, last 02.06.09 10:39:40 am
somebody can make new LUA code :
"Say:!loaded" and give all cs2d weapons and super armour
please its been very nice
Google doesn't help...
EDIT:
@zqqou:
1
if (player(i,"health") > 0 and player(i, "favteam")==1) then
Maybe it throws an error because the player doesn't exists (use player(i,"exists"))
1
2
2
if(player(i,"exists")) then 	if (player(i,"health") > 0) and (player(i, "favteam")==1) then
Maybe that works
I want weapon Claw as my heal teammate and kill enemy, but I have try MiroslavR script.. it's does'nt work
EDIT: NVM, I just get it
edited 1×, last 05.06.09 01:05:22 am
Can you guys help me with a LUA I need [want, moar like. xP] for my server? I just need to know how to make the classes script works. Like what part of the script does what, basically. Also, need help on how to make team-specific classes. [Zombies only]
EDIT: Google fails at finding tutorials to match my attention span. >.>
horus has written
lololol I just don't get LUA yet... The tutorials don't help much.
Can you guys help me with a LUA I need [want, moar like. xP] for my server? I just need to know how to make the classes script works. Like what part of the script does what, basically. Also, need help on how to make team-specific classes. [Zombies only]
EDIT: Google fails at finding tutorials to match my attention span. >.>
Can you guys help me with a LUA I need [want, moar like. xP] for my server? I just need to know how to make the classes script works. Like what part of the script does what, basically. Also, need help on how to make team-specific classes. [Zombies only]
EDIT: Google fails at finding tutorials to match my attention span. >.>
you can use Survivor/Zombie Classes script by Bertykiller here
http://unrealsoftware.de/forum_posts.php?post=120848&start=40
EDIT:
guys, I need help about buy ammo typing..
here the code
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("say","adm_say") function adm_say(id, message) 	if (message ==".ammo") then parse("equip "..id.." 61") parse("equip "..id.." 62") 	 parse("setmoney "..id.." "..-100) 	 end end
all I need is -100, but when I test it with 16000 money, then I type .ammo all my money go to 0 ... can someone help.. I just only want -100 not at all .. tell me if my script got wrong there
edited 1×, last 06.06.09 02:48:44 am
Look, here I've analyzed your code
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("say","adm_say") function adm_say(id, message) 	if (message ==".ammo") then --If you say '.ammo' 		parse("equip "..id.." 61") --Gives you ammo 		parse("equip "..id.." 62") --And more ammo 		parse("setmoney "..id.." "..-100) --And sets your money to -100?! 	end end
This is the code you should use:
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
addhook("say","adm_say") function adm_say(id, message) 	if (message ==".ammo") and (player(id,"ammo">= 100) then 		--If you have enough cash and say ''.ammo'' 		parse("equip "..id.." 61") --Give ammo 		parse("equip "..id.." 62") --And ammo 		parse("setmoney "..id.." "..player(id,"ammo")-100) 		--Substract $100 from actual cash 	end end
Flacko has written
@Admirdee:
Look, here I've analyzed your code
This is the code you should use:
Look, here I've analyzed your code
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("say","adm_say") function adm_say(id, message) 	if (message ==".ammo") then --If you say '.ammo' 		parse("equip "..id.." 61") --Gives you ammo 		parse("equip "..id.." 62") --And more ammo 		parse("setmoney "..id.." "..-100) --And sets your money to -100?! 	end end
This is the code you should use:
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
addhook("say","adm_say") function adm_say(id, message) 	if (message ==".ammo") and (player(id,"ammo">= 100) then 		--If you have enough cash and say ''.ammo'' 		parse("equip "..id.." 61") --Give ammo 		parse("equip "..id.." 62") --And ammo 		parse("setmoney "..id.." "..player(id,"ammo")-100) 		--Substract $100 from actual cash 	end end
wth. lol. hmm I still newbie, thx for the help .
Can somebody LUA script !
zombie clases
its been funny
Assasin-"speedmod 15"equip 84"
warior zombie-"equip 69"equip 41"
old zombie-"equip 80" speedmod -5"
classic-"_=balanced=_
Tank- "equip 81" equip 51"equip 76"
please make this l\LUA skript its been good
sacred111 has written
Hello !
Can somebody LUA script !
zombie clases
its been funny
Assasin-"speedmod 15"equip 84"
warior zombie-"equip 69"equip 41"
old zombie-"equip 80" speedmod -5"
classic-"_=balanced=_
Tank- "equip 81" equip 51"equip 76"
please make this l\LUA skript its been good
Can somebody LUA script !
zombie clases
its been funny
Assasin-"speedmod 15"equip 84"
warior zombie-"equip 69"equip 41"
old zombie-"equip 80" speedmod -5"
classic-"_=balanced=_
Tank- "equip 81" equip 51"equip 76"
please make this l\LUA skript its been good
You mean to give the zombies in cs2d the abilities from CS 1.6?
PM me if you done it
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("startround", "givemoney") function givemoney(mode) 	for i = 0, 32, 1 do 		if (player(i, "exists") == true) then 			parse("setmoney "..i.." 16000") 		end 	end end
How to make laser heal anyone who will be hurt with it?