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

Quote:
Originally Posted by Lordz™
Посмотреть сообщение
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, but 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.
Thanks for the suggestions, you can improve it if you like as im already working on something else now. And thank you for the positive comments, this could come in useful if you needed it.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)