Raised This Month: $ Target: $400
 0% 

Just a stupid Question..About Damage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-30-2010 , 20:31   Re: Just a stupid Question..About Damage
Reply With Quote #3

Alucard, you must use a float for the entire calculation.

#define PORCENT 50.0

new Float:fResult = (fDamage * PORCENT) / 100.0;

Why not just set PORCENT as a percentage ( 0.5 , 0.75 , 1.5 ) etc. Then you will not need to divide by 100.
__________________

Last edited by Bugsy; 07-30-2010 at 20:46.
Bugsy is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:11.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode