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 2205 206 207338 339 Nächste Zum Anfang

alt Re: Lua Scripts/Questions/Help

Admir
User Off Offline

Zitieren
Alexkiller2895 hat geschrieben
I don't know how its work with Lau Files. can Anyone in this Forum help me with that`?

BY Alex


oh my teh god, use notepad to open the .lua files!

EDIT: Schinken faster than me

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
Alexkiller2895 hat geschrieben
I don't know how its work with Lau Files. can Anyone in this Forum help me with that`?

BY Alex


What do you want to do with lua files?

alt Terrorist only.

Promaster
User Off Offline

Zitieren
Hi i am a new player and i want to create a RP_Mod. and i want a few can be CT only and all most that will be autobalance to Terrorist. (Sry Bad English)

Anyone can help me?

By Alex

alt Re: Lua Scripts/Questions/Help

Trotskygrad
User Off Offline

Zitieren
Alexkiller2895 hat geschrieben
Hi i am a new player and i want to create a RP_Mod. and i want a few can be CT only and all most that will be autobalance to Terrorist. (Sry Bad English)

Anyone can help me?

By Alex


stop trying to copy my server dammit

alt Re: Lua Scripts/Questions/Help

Vectarrio
User Off Offline

Zitieren
Please, post the script, which writes each pixel of .bmp file to table. I've seen it somewhere, maybe in the files, but now, I don't know, where is it, and I need it.

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
I wrote a file that would take a bmp or png image and get info from it's headers.
It wasn't able to load the bitmap because I didn't need that, but I started working on that as soon as I saw your post, maybe tomorrow it will be ready...

Edit:
I didn't fully test this one, but I'd be glad if you can tell me about any bugs
Mehr >
1× editiert, zuletzt 01.06.10 23:26:23

alt Re: Lua Scripts/Questions/Help

Vectarrio
User Off Offline

Zitieren
Thank you, but I don't know how to use it. I read the "usage", however, I'm too stupid to understand that. Please can you just say about each function?

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
Vectar666 hat geschrieben
Thank you, but I don't know how to use it. I read the "usage", however, I'm too stupid to understand that. Please can you just say about each function?

1
2
3
4
a = loadBitmap("gfx/flare2.bmp")
print(a.map[y][x].r)
print(a.map[y][x].g)
print(a.map[y][x].b)

alt Re: Lua Scripts/Questions/Help

Vectarrio
User Off Offline

Zitieren
Flacko hat geschrieben
Vectar666 hat geschrieben
Thank you, but I don't know how to use it. I read the "usage", however, I'm too stupid to understand that. Please can you just say about each function?

1
2
3
4
a = loadBitmap("gfx/flare2.bmp")
print(a.map[y][x].r)
print(a.map[y][x].g)
print(a.map[y][x].b)

Thank you very very much!

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
HeaDHunTeR600 hat geschrieben
hi i want claw give healt 10 pls make this


That has been made atleast a thousand of times.
Use the search function or search it by yourself.
Have a nice day.

alt Re: Lua Scripts/Questions/Help

YellowBanana
BANNED Off Offline

Zitieren
this is the script:

1
2
3
4
5
6
7
8
function hit(id1,id2) 
	a = 1
	while(a==1)
		msg("Thanks for copy pasting this script!")
	end
	parse("sethealth "..id2.." "..player(id2,"health)+10)	
end
hit(1,2)

alt Re: Lua Scripts/Questions/Help

palomino
User Off Offline

Zitieren
I really need some help here. I can't make my script working because I need to put "end" in the end of my function, but I did do that. Here is the script:

function initArray(m)
     local array = {}
     for i = 1, m do
          array[i]=0
     end
     return array
end
achvmfunc.lvl=initArray(32)
achvmfunc.timer=initArray(32)

addhook("kill","achvmfunc")
function achvmfunc(killer,victim,weapon)
     if (os.clock()-achvmfunc.timer[killer])>3 then
          achvmfunc.lvl[killer]=0
     end
     level=achvmfunc.lvl[killer]
     level=level+1
     achvmfunc.lvl[killer]=level
     killtimer[killer]=os.clock()

     if (weapon==1) and (level==5) then
          msg(player(killer,"name").." made 5 kills with a USP! ")
          parse("equip "..id.." 57")
     if (weapon==2) and (level==5) then
          msg(player(player,"name").." made 5 kills with a Glock! ")
          parse("equip "..id.." 57")
     if (weapon==32) and (level==10) then
          msg(player(killer,"name").." became a Marksman! ")
          parse("equip "..id.." 58")
     if (weapon==30) and (level==10) then
          msg(player(killer,"name").." became a Marksman! ")
          parse("equip "..id.." 58")
     if (weapon==35) and (level==5) then
          msg(player(killer,"name").." is a Sniper! ")
     if (weapon==69) and (level==5) then
          msg(player(player,"name").." is a Psycho! Hunt him down! ")
     end
end

alt Re: Lua Scripts/Questions/Help

archmage
User Off Offline

Zitieren
Replace the
1
2
3
4
if (...) then
	...
if (...) then
	...
with
1
2
3
4
5
6
if (...) then
	...
end
if (...) then
	...
end
if (...) then
     ...
elseif (...) then
..end
[/code]
Zum Anfang Vorherige 1 2205 206 207338 339 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht