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 2203 204 205338 339 Nächste Zum Anfang

alt Re: Lua Scripts/Questions/Help

Lee
Moderator Off Offline

Zitieren
Dark Byte hat geschrieben
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.

alt Re: Lua Scripts/Questions/Help

archmage
User Off Offline

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

alt Re: Lua Scripts/Questions/Help

Redefinder
User Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

TimeQuesT
User Off Offline

Zitieren
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 )
1× editiert, zuletzt 24.05.10 17:44:55

alt Re: Lua Scripts/Questions/Help

Redefinder
User Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

TimeQuesT
User Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

TimeQuesT
User Off Offline

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

alt Re: Lua Scripts/Questions/Help

TimeQuesT
User Off Offline

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

alt Re: Lua Scripts/Questions/Help

archmage
User Off Offline

Zitieren
redefinder hat geschrieben
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.

alt Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Zitieren
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 hat geschrieben
Pixel colors are multiplied with backbuffer pixel colors, giving a 'shading' effect
1× editiert, zuletzt 25.05.10 12:25:10

alt Re: Lua Scripts/Questions/Help

siuL
User Off Offline

Zitieren
Spoiler >

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

Admin/Mod Kommentar

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

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

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