[FilterScript] Weapon specifier - Advanced weapon system.
#6

I don't understand why you've switched to many cases. Why not like this?
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
 //As you've declared it from 0-100 :
 new Float:damagingvar;
 if(DAMAGE[playerid] <= 0) damagingvar = 0.0;
 else if(DAMAGE[playerid] >= 100) damagingvar = 100.0;
 else damagingvar = DAMAGE[playerid];
 new Float:hp;
 GetPlayerHealth(damagedid, hp);
 SetPlayerHealth(damagedid, hp-damagingvar);
 return 1;
}
The rest all seems good, but however, you could make this filterscript much more better.
• It'd also effect the players who are paused.
• It only reduces health, would improve more if it's like normal damages happening.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)