[QUOTE=BboyEatsbacon;1658989]
PHP Code:
function onCreated() {
setTimer(0.05);
}
function onWasH1t() {
this.last_attacker = player.account;
}
function onTimeOut() {
if (this.hearts == "0" || this.hearts == NULL) {
findplayer(this.last_attacker).addweapon("SomeWeaponName");
}
setTimer(0.05);
}
Quote:
Originally Posted by fowlplay4
2. Your "solution" would constantly add the weapon to the player while it's dead.
|
What fowlplay wants to say is:
PHP Code:
function onWasH1t() {
this.last_attacker = player.account;
if (this.hearts == "0" || this.hearts == NULL) { //If you use costume health system for baddies or whatever than replace it with this part
findplayer(this.last_attacker).addweapon("SomeWeaponName");
}
}
and again 1 = i at the WasH1t