Forum

> > CS2D > Scripts > Lua Scripts/Questions/Help
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Lua Scripts/Questions/Help

6.770 Antworten
Seite
Zum Anfang Vorherige 1 2127 128 129338 339 Nächste Zum Anfang

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
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.

alt Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Zitieren
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)

alt Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Zitieren
Your function doesn't work properly.

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

Blazzingxx hat geschrieben
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.

alt Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Zitieren
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 ?)

alt Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Zitieren
memo hat geschrieben
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

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
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.

alt Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Zitieren
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 ?

alt Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Zitieren
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.

alt Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Zitieren
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 ...

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Zitieren
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

alt XDD

hyh2
COMMUNITY BANNED Off Offline

Zitieren
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..
1× editiert, zuletzt 01.01.10 00:38:06

alt Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Zitieren
hyh2 hat geschrieben
null

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

Edit:
hyh2 hat geschrieben
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?
1× editiert, zuletzt 01.01.10 00:43:06

alt Re: Lua Scripts/Questions/Help

hyh2
COMMUNITY BANNED Off Offline

Zitieren
Blazzingxx hat geschrieben
hyh2 hat geschrieben
null

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

idk, what that null was : o

alt Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Zitieren
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 >
Zum Anfang Vorherige 1 2127 128 129338 339 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht