Forum

> > CS2D > Scripts > Increase damage
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Increase damage

4 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Increase damage

illya
User Off Offline

Zitieren
Hi us.
Got problem.
I want make own mini super hero script not for publishing.
There a damn problem:
1
2
3
4
5
6
7
addhook("hit","hit")
function hit(id,source,weapon,hpdmg,apdmg)
if player(id,"usgn") == ***** then
hp = player(id,"health")-hpdmg-4
parse("sethealth "..source.." "..hp)
end
end
Player with usgn ***** must give more damage.
Skipping real damage vie "return 1".
I't dont work, why ?
Console is clear as my conscience

alt Re: Increase damage

sixpack
User Off Offline

Zitieren
There is another why buy why you don't try increasing weapon's damage on attack, and set it back to normal when the attack is over?

alt Re: Increase damage

DC
Admin Off Offline

Zitieren
Zitat
Skipping real damage vie "return 1".

oh really? I don't see any return command in your script...
also you are confusing the IDs of the target (id) and the shooter (source) almost always! be careful!

alt Re: Increase damage

Bowlinghead
User Off Offline

Zitieren
1
2
3
4
5
6
7
addhook("hit","hit")
function hit(id,source,weapon,hpdmg,apdmg)
if player(id,"usgn") == ***** then
hp = player(id,"health")-4 -- Anyway, the HPdamage is included. So you just need -4!
parse("sethealth "..id.." "..hp) -- What DC sayed: ID = Victim and Source=Attacker! So you have to type "id" not "source"!
end
end

alt Re: Increase damage

DC
Admin Off Offline

Zitieren
this fix is still wrong. return 1 is still missing. you should subtract the hp as he did before and add a return 1 instead (causes half traffic of what you do).

also
1
if player(id,"usgn") == ***** then
is still using the id of the victim. that would mean that the user with this ID would be more vulnerable instead of causing more damage.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht