Raised This Month: $ Target: $400
 0% 

Help with HUD


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Lucho.
Member
Join Date: Jul 2012
Location: Buenos Aires, Argentina
Old 05-31-2014 , 15:14   Re: Help with HUD
Reply With Quote #1

No need to put all the code as it is in that line the bug.
What I want is to divide kills by deaths and give me the result in the hud where "K / D" said. No if he understood. for example
Kills 10
Deaths: 5
K/D: 2.0
Lucho. is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-31-2014 , 23:50   Re: Help with HUD
Reply With Quote #2

You have to change the kills and deaths to floating point values before you can divide. Then, you have to use %f and not %d to show the value.

Code:
Float:kdr = float(kills)/float(deaths)
__________________

Last edited by fysiks; 06-01-2014 at 02:20. Reason: fixed my variable tagging.
fysiks is online now
Reply



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 18:06.


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