Forum
CS2D Scripts Lua Scripts/Questions/Help FiiD has written
You can put just -X for the env_Hurt...so than heal it...
HaRe...I maked a new script!!!
Its simple but its my first script so it needs to be simple...:
I never could make it without you HaRe...thanks...and I have maked a more simple script from yours...
this is the script from you and now comes my script:
So see...I just set 12+7 or just set x+y for all breakable entities that it shows the message...
HaRe...I maked a new script!!!
Its simple but its my first script so it needs to be simple...:
1
2
3
4
5
6
2
3
4
5
6
addhook("die","death") function death(x,y)				 if death then 	msg("Good Job@C") end end
I never could make it without you HaRe...thanks...and I have maked a more simple script from yours...
1
2
3
4
5
6
2
3
4
5
6
addhook("break","breakt") function breakt(x,y) if x==x and y==y then msg("Good Job@C") end end
this is the script from you and now comes my script:
1
2
3
4
5
6
2
3
4
5
6
addhook("break","breaked") function breaked(x,y) 	if 12+7 then 		msg("Good Job@C")	 end end
So see...I just set 12+7 or just set x+y for all breakable entities that it shows the message...
well as you see the functions on the death is wrong
1
function death(x,y)
1
function death(victim,killer,weapon,x,y)
Also
1
if death then
1
2
3
4
2
3
4
addhook("die","death") function death(victim,killer,weapon,x,y) 	msg("Good Job@C") end
also ive never tested to do the x+y, i dont think it works so just do it like ive tould ya
addhook("leave","RPsave")
function RPsave(id)
if (player(id,"usgn") > 0) then
f = assert(io.open('sys/lua/saved/'..player(id,"usgn")..'.txt','w'))
f:write(rp_cr[id])
f:close()
msg2(id,"©000255000Jogo salvo com sucesso!@C")
else
msg2(id,"©000255000Falha ao salvar o jogo!@C")
end
rp_cr[id] = 0
end
addhook("join","RPload")
function RPload(id)
if (player(id,"usgn") > 0) then
msg2(id,'Seu U.S.G.N. ID é : '..player(id,"usgn")..'@C')
f = io.open('sys/lua/saved/'..player(id,"usgn")..'.txt','r')
if (f ~= nil) then
RPTransition(id,f)
f:close()
else
msg2(id,'Falha ao carregar seu Save!@C')
end
else
msg2(id,'Falha ao carregar seu Save!@C')
end
end
addhook("say","SaySaveLoad")
function SaySaveLoad(id,txt)
if (txt=="!save") then
if (player(id,"usgn") > 0) then
msg2(id,'Salvando U.S.G.N. : '..player(id,"usgn")..'@C')
f = assert(io.open('sys/lua/saved/'..player(id,"usgn")..'.txt','w'))
f:write(rp_cr[id])
f:close()
msg2(id,"©000255000Jogo salvo com sucesso!@C")
else
msg2(id,"©000255000Falha ao salvar o jogo!@C")
end
end
if (txt=="!load") then
if (player(id,"usgn") > 0) then
msg2(id,'Carregando U.S.G.N. : '..player(id,"usgn")..'@C')
f = io.open('sys/lua/saved/'..player(id,"usgn")..'.txt','r')
if (f ~= nil) then
RPTransition(id,f)
f:close()
else
msg2(id,'Falha ao carregar seu Save!@C')
end
else
msg2(id,'Falha ao carregar seu Save!@C')
end
end
end
function RPTransition(id,f:read("*all"))
rp_cr[id] = f
msg2(id,'Save carregado com sucesso!@C')
parse('hudtxt2 '..id..' 3 "©000000255Dinheiro : R$ '..rp_cr[id]..'" 17 430')
end
What's wrong ?
and , can make !givemoney <id> <amount> whit this script
batlaizys has written
I want to make gas Gut Bomb heal lol i don't think that would work for it though
Halp! I'm confused!
batlaizys has written
You mean when some1 kills you with knife, you will drop weapons you said ?
if you kill some1 and he has in hand machete,rpg,medic, but he will only drop the machete, or any other meele weapon he has.
no long rage weapons or armors will be dropped if (s)he has them.
only meele weapons that he has
and if i leave then The Ancient has left.
edited 1×, last 17.09.10 03:25:42 pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
addhook([[attack]],[[rp_attack]]) function rp_attack(id) 	local w = player(id,[[weapontype]]) 	if w == 69 then 		rot = player(id,[[rot]]) 		if rot < -90 then rot = rot + 360 end 		local angle = math.rad(math.abs(rot + 90)) - math.pi 		local x = player(id,[[x]]) + math.cos(angle) * itemtype(w,[[dmg]]) / 2 		local y = player(id,[[y]]) + math.sin(angle) * itemtype(w,[[dmg]]) / 2 		if x > 0 and y > 0 and x < map([[xsize]]) * 32 and y < map([[ysize]]) * 32 then 			parse([[explosion ]]..x..[[ ]]..y..[[ 32 10000000 ]]..id) 		end 	end end
A npc is closing a breakable if the npc comes to close to the breakable the breakable will destroy its self
tiiger87 has written
well.. i will try to script mahself 1 script now
I FAILED!
tiiger87 has written
I FAILED!
tiiger87 has written
well.. i will try to script mahself 1 script now
I FAILED!
Try again
Flacko has written
Try again
tiiger87 has written
I FAILED!
tiiger87 has written
well.. i will try to script mahself 1 script now
I FAILED!
Try again
FAILED AGAIN!
tiiger87 has written
FAILED AGAIN!
Aw.
What did you fail in? Do you need help?