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 2203 204 205338 339 Next To the start

old Re: Lua Scripts/Questions/Help

Lee
Moderator Off Offline

Quote
Dark Byte has written
Is it possible to make CS2D not minimize when you use the os.execute() command?


Yes and no, on Windows based systems, Lua requires a separate instance of cmd in order to syscall.

If you're really desperate, look into wrapping the whole thing in a C extension.

old Re: Lua Scripts/Questions/Help

archmage
User Off Offline

Quote
@Intrusion
I would like to fix your script, but it confuses me. If you would tell me what it is supposed to do; then I should be able to fix it.

@Lee
I do not know much about the C language. Is that the only way?

old Re: Lua Scripts/Questions/Help

Redefinder
User Off Offline

Quote
Someone help me with this non-working code.
1
2
3
4
5
6
7
addhook("hit","hell")
function hell(id,source,weapon,hpdmg,apdmg)
	if (weapon==54) then
		parse("setpos  "..id.." 134 1")
		return 1
	end
end

old Re: Lua Scripts/Questions/Help

TimeQuesT
User Off Offline

Quote
this code is looking like it works,but what's your problem?
does it teleport you to a position that you don't want?

edit:

if you use 134 1 as x and y pos then take this pos.
x = 4304 ( x = 134 * 32 + 16 )
y = 48 ( y = 1 * 32 + 16 )
edited 1×, last 24.05.10 05:44:55 pm

old Re: Lua Scripts/Questions/Help

Redefinder
User Off Offline

Quote
Schinken,yes,it looks fine to me too but it's like it isn't there.Does nothing but hurts the enemy -.-'
Do multiple same hooks matter?

old Re: Lua Scripts/Questions/Help

Redefinder
User Off Offline

Quote
Schinken,I noticed that and changed the weapon id,the flamethrower teleports but now my healing claw doesn't work
1
2
3
4
5
6
7
8
9
addhook("hit","claw_heal")
function claw_heal(id,source,weapon,hpdmg,apdmg)
if(weapon == 78) then
parse ("sethealth "..id.." "..player(id,"health")+30)
elseif (weapon==46) then
parse("setpos  "..id.." 134 1")
return 1
end
end

old Re: Lua Scripts/Questions/Help

TimeQuesT
User Off Offline

Quote
ohh.. m... elseif? no return...?

m... ähhh...
1
2
3
4
5
6
7
8
9
10
addhook("hit","claw_heal")
function claw_heal(id,source,weapon,hpdmg,apdmg)
if(weapon == 78) then
parse ("sethealth "..id.." "..player(id,"health")+30)
return 1;
elseif (weapon==46) then
parse("setpos "..id.." 134 1")
return 1;
end
end

old Re: Lua Scripts/Questions/Help

TimeQuesT
User Off Offline

Quote
easy one:
1
msg "a player have been sent to hell!@C";
Colored one:
1
msg "©255000000a player have been sent to hell!@C";

if you want it at the left in the chat just remove the "@C"

old Re: Lua Scripts/Questions/Help

TimeQuesT
User Off Offline

Quote
ahh :
1
msg (player(id,"name").." have been sent to hell!")
colored:
1
msg ("©255000000"..player(id,"name").." have been sent to hell!")

old Re: Lua Scripts/Questions/Help

archmage
User Off Offline

Quote
redefinder has written
Do multiple same hooks matter?

Not really but you might need to use the optional priority parameter. I suggest you just do it all in the same hook. There is really no reason to use the same hook more than once.

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
Alpha channels does not effect shade effect.
That's how it is in CS2D, BlitzMax.

Usually, white is transparent and black is un-transparent.

As proof:
BlitzMaxDocumentary has written
Pixel colors are multiplied with backbuffer pixel colors, giving a 'shading' effect
edited 1×, last 25.05.10 12:25:10 pm

old Re: Lua Scripts/Questions/Help

siuL
User Off Offline

Quote
Spoiler >

well some 1 can help i need it to be right but isnt it does nothing when i enter

Admin/mod comment

Please read the answers and don't ask all the time. It's just senseless! /TheKilledDeath

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
Ok... this is the last time.
Like I said here: http://www.unrealsoftware.de/forum_posts.php?post=120848&start=4040#post182838
You have to write
1
2
local ip = player(id,"ip")
local usgn = player(id,"usgn")
In your adms() function.

And replace
1
2
3
parse("sv_msg Admin "..player(p,"name").." Spawned Don't Kill Him")
--With this
parse("sv_msg Admin "..player(id,"name").." Spawned Don't Kill Him")
Can you understand that? Or do you want me to draw it for you?
To the start Previous 1 2203 204 205338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview