Raised This Month: $ Target: $400
 0% 

Floats Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 10-26-2007 , 14:56   Re: Floats Help
Reply With Quote #1

Code:
new Float:Ratio = float(g_CarMaxSpeed[id]) / 1000.0;
g_Userspeed[id] = Ratio * float(g_PredefGears[g_CurrentGear[id]]);
server_print("%.1f | %.1f", Radio, g_Userspeed[id]);


Note: g_Userspeed[id] must be a float too :s
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
ng1200
Member
Join Date: May 2005
Old 10-26-2007 , 15:42   Re: Floats Help
Reply With Quote #2

Quote:
Originally Posted by Alka View Post
Code:
new Float:Ratio = float(g_CarMaxSpeed[id]) / 1000.0;
g_Userspeed[id] = Ratio * float(g_PredefGears[g_CurrentGear[id]]);
server_print("%.1f | %.1f", Radio, g_Userspeed[id]);


Note: g_Userspeed[id] must be a float too :s
g_Userspeed is already a float
Thanks for the help.
ng1200 is offline
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 01:20.


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