English Lua Scripts/Questions/Help

6,770 replies
Goto Page
To the start Previous 1 2 ... 203 204 205 ... 338 339 Next To the start
24.05.10 01:32:05 am
Up
siuL
User
Offline Off
omg lol i just need help to it be right
edited 2×, last 24.05.10 02:04:39 am
24.05.10 07:43:48 am
Up
archmage
User
Offline Off
Is it possible to make CS2D not minimize when you use the os.execute() command?
We must secure the existence of our people and a future for white children. 14/88
24.05.10 07:54:27 am
Up
Sudden Death
User
Offline Off
Dark byte plizz fix my last script
Sniffin'Man "If it cannot be done with lua, it must be you mama, coz she's too fat"
24.05.10 08:20:47 am
Up
Lee
Moderator
Offline Off
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.
24.05.10 08:54:58 am
Up
archmage
User
Offline Off
@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?
We must secure the existence of our people and a future for white children. 14/88
24.05.10 05:38:39 pm
Up
Redefinder
User
Offline Off
Someone help me with this non-working code.
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
24.05.10 05:41:45 pm
Up
TimeQuesT
User
Offline Off
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
Muh
24.05.10 05:43:37 pm
Up
Redefinder
User
Offline Off
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?
24.05.10 05:46:35 pm
Up
TimeQuesT
User
Offline Off
you know that the weapon "54" the flare is ?
Muh
24.05.10 05:51:06 pm
Up
Redefinder
User
Offline Off
Schinken,I noticed that and changed the weapon id,the flamethrower teleports but now my healing claw doesn't work
Code:
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
24.05.10 05:53:44 pm
Up
TimeQuesT
User
Offline Off
ohh.. m... elseif? no return...?

m... ähhh...
Code:
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
Muh
24.05.10 05:57:34 pm
Up
Redefinder
User
Offline Off
Schinken,ty very much

Another thing,how do I make when struck with flamethrower a message comes up:player has been sent to hell
24.05.10 06:00:05 pm
Up
TimeQuesT
User
Offline Off
easy one:
Code:
1
msg "a player have been sent to hell!@C";

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


if you want it at the left in the chat just remove the "@C"
Muh
24.05.10 06:01:08 pm
Up
Redefinder
User
Offline Off
Schinken,no,I mean the name of the player that has been sent to hell.
24.05.10 06:02:39 pm
Up
TimeQuesT
User
Offline Off
ahh :
Code:
1
msg (player(id,"name").." have been sent to hell!")

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

Muh
24.05.10 06:44:36 pm
Up
archmage
User
Offline Off
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.
We must secure the existence of our people and a future for white children. 14/88
24.05.10 09:14:12 pm
Up
KINGGOLDrus
User
Offline Off
How to apply "shade mode" to image with alpha-mask?
24.05.10 09:18:38 pm
Up
SQ
Moderator
Offline Off
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
24.05.10 10:41:49 pm
Up
siuL
User
Offline Off
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
25.05.10 01:24:52 am
Up
Flacko
User
Offline Off
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
Code:
1
2
local ip = player(id,"ip")
local usgn = player(id,"usgn")

In your adms() function.

And replace
Code:
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 2 ... 203 204 205 ... 338 339 Next To the start