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 2127 128 129338 339 Next To the start

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
Well, if you put that into two different files and included them in server.lua using dofile... Your whole script is WRONG.
I can make you a quick list of your errors:
1-You modified DCs sample without even knowing what were you doing.
2-You used a useless long list of ifs, but you didn't use a single elseif.
3-You made a table with all the functions and shit. Then you tried to make another table with the same name, but you failed because you just copied DCs sample.

old Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Quote
ok did you mean like this Blazzingxx :-
Spoiler >

and Btw the script i just gave you crash the game so its
cod4.ut.sec
or
cod4.ut (only)

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
Your function doesn't work properly.

You should know what table you are using. Look at other your functions.

Blazzingxx has written
1
2
3
4
5
6
7
8
9
10
addhook("second","blazz_heal")
function blazz_heal()
	local i, health
	for i = 1, 32 do
		health = player(i,"health")
		if (player(i,"exists") and health < 100) then
			parse("sethealth "..i.." "..(health + 4))
		end
	end
end


I gave you this function before.

old Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Quote
yea i know but on CoD-MW2D not all players have 100 hp ,there a classes have more than 100 and there classes have less than 100 so i didnot know how to change or what i do.
Btw i donot know how to make "table".i canot wait for your
CS2D Scripting Manual it gona really help to learn more lua treks.(on your manual there is how to make table right ?)

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
memo has written
yea i know but on CoD-MW2D not all players have 100 hp ,there a classes have more than 100 and there classes have less than 100 so i didnot know how to change or what i do.

Just delete small part, that's all.

1
2
3
4
5
6
7
8
9
10
addhook("second","blazz_heal")
function blazz_heal()
	local i, health
	for i = 1, 32 do
		health = player(i,"health")
		if (player(i,"exists")) then
			parse("sethealth "..i.." "..(health + 4))
		end
	end
end

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
Dude, you make me really angry and nervous.
Read this shit before you come back with any fucking questions (please)
http://www.lua.org/manual/5.1/
Making tables is one of the easiest things on lua (in fact, lua itself is very easy)

And you don't need to check how much health do players have, just
1
2
3
4
5
6
7
8
addhook("second","blazz_heal")
function blazz_heal()
	for i = 1, 32 do
		if player(i,"exists") then
			parse("sethealth "..i.." "..(player(i,"health")+4))
		end
	end
end
CS2D won't set a player's health above his max health.

old Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Quote
oh yay thanks Blazzingxx i take the part you gave me and cut some things ,you are now a helper so i will add your name to CoD-MW2D helprs ok ?

old Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Quote
what flcako said ok the manual i go for it always but i understand thing (but not all thing's and here i am learing
not so fast, i want to understand it first ) and this thread is for question like this so

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
You see, It's annoying when one guy asking 10 questions for scripts everyday and upload all those (my or flacko's, ect) scripts as his own.

old Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Quote
the ideia was my you and flacko only help me but the basic idia by me i am new at lua so i ask help ,if you and flacko don't want to help thats okay ...
there is modarte can help me ..
WoW this thread open for asking 100 question per day!
if you and flacko don't want to help its ok ...

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
Ok, whatever you say.
But you aren't helping us to help you.
If you want our help, you should first try to read the manual, try to really learn lua, and try to understand what you are doing in your scripts.
And blazzing is right, you aren't the only one that (more or less) fits in the description he gave a few posts above.
Have a happy new year

old Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Quote
Happy new year too
i will promise you both that i will read the manual but i have this last week of final exams when i finish the final exams i will read it another time to i understand it .
and if any one feel some bad from me i am sorry to him

old XDD

hyh2
COMMUNITY BANNED Off Offline

Quote
I NEED HELP!
---------
If i press button in map, then come menu where is 6 buttons and if i press button 1 then i get cap (sprites) and so on..
edited 1×, last 01.01.10 12:38:06 am

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
hyh2 has written
null

Spam...
By the way, probably it's called Nil on Lua

Edit:
hyh2 has written
If i press button in map, then come menu where is 6 buttons and if i press button 1 then i get cap (sprites) and so on..

Yes? So?
edited 1×, last 01.01.10 12:43:06 am

old Re: Lua Scripts/Questions/Help

hyh2
COMMUNITY BANNED Off Offline

Quote
Blazzingxx has written
hyh2 has written
null

Spam...
By the way, probably it's called Nil on Lua

idk, what that null was : o

old Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Quote
blazzingxx how to make a title on up the screen like your GunGame mod v-(1.1) << Example
i have the script but when i put it and entar the game it didnot appers any way on the screen and when i click console all hook add and all thing alright where the msg go i don't know ?
Spoiler >
To the start Previous 1 2127 128 129338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview