I creating infect gas granade and it's not working...
if sample==nil then sample={} end
sample.infect={}
----------------
addhook("hit","granade_infect")
function Gas Granade_infect(id,source,weapon,hpdmg,apdmg)
if(weapon == 72) then
parse ("sethealth "..id.." "..player(id,"health")-10)
end
end
If someone can tell me how to fix this? edited 1×, last 01.11.09 09:10:25 am
Admin/mod comment
Pushing is forbidden. In addition, you should have used the Scripting Questions Thread. Closed /TheKilledDeath SQ Moderator Offline
You need totaly delete tables becouse you are not using those:
1
2
if sample==nil then sample={} end
sample.infect={}
Your function is just nonsence
1
2
3
:o: These two should be same.
addhook("hit","[u]granade_infect[/u]")
function [u]flamethrower_heal[/u](p,s,wpn,hp,ap)
Btw, this function is about damage... What you want exacly to do?
PS: You should post Lua questions here:
http://unrealsoftware.de/forum_posts.php?post=120848#lastpost "addhook("hit","fame_heal")
function flamethrower_heal(id,source,weapon,hpdmg,apdmg)
if(weapon == 72) then
parse ("sethealth "..id.." "..player(id,"health")+10)
end
end"
lol this is my oooollllldddd script my first script
yu can change damage of weapon with konsole Just to fix future misspellings and to avoid bad English written scripts, it's grenade not granade. 1
2
3
4
5
6
addhook("hit","grenade_infect")
function Grenade_infect(id,source,weapon,hpdmg,apdmg)
if(weapon == 72) then
parse ("sethealth "..id.." "..player(id,"health")-10)
end
end