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 2205 206 207338 339 Next To the start

old Re: Lua Scripts/Questions/Help

Admir
User Off Offline

Quote
Alexkiller2895 has written
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

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
Alexkiller2895 has written
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?

old Terrorist only.

Promaster
User Off Offline

Quote
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

old Re: Lua Scripts/Questions/Help

Trotskygrad
User Off Offline

Quote
Alexkiller2895 has written
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

old Re: Lua Scripts/Questions/Help

Vectarrio
User Off Offline

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

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
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
More >
edited 1×, last 01.06.10 11:26:23 pm

old Re: Lua Scripts/Questions/Help

Vectarrio
User Off Offline

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

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
Vectar666 has written
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)

old Re: Lua Scripts/Questions/Help

Vectarrio
User Off Offline

Quote
Flacko has written
Vectar666 has written
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!

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
HeaDHunTeR600 has written
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.

old Re: Lua Scripts/Questions/Help

YellowBanana
BANNED Off Offline

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

old Re: Lua Scripts/Questions/Help

palomino
User Off Offline

Quote
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

old Re: Lua Scripts/Questions/Help

archmage
User Off Offline

Quote
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]
To the start Previous 1 2205 206 207338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview