Forum
CS2D Scripts Lua Scripts/Questions/Helphowever this is a dirty solution and the money display will always display a maximum of 16000$. you can't change this limit.
The "real" money is 0 everytime.
Only "virtual" money is used.
It's showed by a hudtxt over the normal money.
P.S. Yes, you need to know lua to script. Duh.
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
addhook("kill","RIP") function RIP(id) 	if (player(id,"money")>5999) then 		parse("setmoney "..id.." "..player(id,"money")-6000) freeimage(id) id1=image("gfx/RIP.bmp",1,1,200+id) 		imagecolor(id1,255,255,255)						 		imageblend(id1,0)								 		imagealpha(id1,0.5)	 	end 	end
Ruirize has written
You're applying it to a dead player. Fail.
Lol? That's not what's wrong.
I won't fix it for you but:
You should use 'die' hook, specially because it has x and y parameters.
You should use an array to store images' ids.
You should use imagepos.
You shouldn't copy DC's glowing players example.
You should learn lua so you understand what you are doing.
an example would be
givewrench=0
splitteams=1
in the ini file.
Also how could you select a random player from a specific team?
And I dont know the other one,prehaps math.random?
what code would i need to execute the file
perhaps something like
file = assert(io.open("sys/lua/...
but after that i'm not sure
edit:
@saladface27
dofile('sys/lua/...')
edited 1×, last 13.04.10 02:25:37 pm
weiwen has written
May I know if there is a hook for destroying buildings?
I see only this in info txt:
break(x,y) on breaking a breakable entity
-x: breakable x (tiles)
-y: breakable y (tiles)
Patasuss has written
I think break(x,y) is for the breakables from Editor.
Exactly, but maybe it will fit to destroying buildings...
How could i do that?