Raised This Month: $ Target: $400
 0% 

Help : int <-> float conversion ?!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Drak
Veteran Member
Join Date: Jul 2005
Old 01-23-2009 , 20:38   Re: Help : int <-> float conversion ?!
Reply With Quote #1

floatround() ?
float() ?
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-23-2009 , 22:02   Re: Help : int <-> float conversion ?!
Reply With Quote #2

This is how you would do it with floats.
Also, you should use pcvars.

Code:
new mp_buytime; new mp_freezetime; public plugin_init() {     mp_buytime = get_cvar_pointer("mp_buytime");     mp_freezetime = get_cvar_pointer("mp_freezetime"); }
Code:
new Float:buytime_total = get_pcvar_float(mp_buytime) * 60.0 + get_pcvar_float(mp_freezetime);
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-24-2009 , 05:13   Re: Help : int <-> float conversion ?!
Reply With Quote #3

Quote:
Originally Posted by Exolent[jNr] View Post
Also, you should use pcvars.
Also, you should read a Pawn tutorial.
SnoW is offline
Send a message via MSN to SnoW
sappounet
Junior Member
Join Date: Jan 2009
Old 01-24-2009 , 09:22   Re: Help : int <-> float conversion ?!
Reply With Quote #4

Thanks for your answers !

I got another question :

For server performance, is it better to have 1 big plugin/file or many small ?

Thanks
sappounet is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-24-2009 , 11:13   Re: Help : int <-> float conversion ?!
Reply With Quote #5

Quote:
Originally Posted by sappounet View Post
Thanks for your answers !

I got another question :

For server performance, is it better to have 1 big plugin/file or many small ?

Thanks
We are going out of topic here aren't we? Anyway, one big. Though it's so much easier to handle plugins if they are separately.
SnoW is offline
Send a message via MSN to SnoW
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-24-2009 , 17:56   Re: Help : int <-> float conversion ?!
Reply With Quote #6

Quote:
Originally Posted by SnoW View Post
We are going out of topic here aren't we? Anyway, one big. Though it's so much easier to handle plugins if they are separately.
Not completely true.
If there are multiple plugins using frequently-called forwards (such as PreThink, ServerFrame, etc.), then it is better to combine them.
Otherwise, it doesn't make much of a difference.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-25-2009 , 05:34   Re: Help : int <-> float conversion ?!
Reply With Quote #7

Quote:
Originally Posted by SnoW View Post
Though it's so much easier to handle plugins if they are separately.
Here I meant, that if you combine all your server plugins to one sma, and after that want to take one off, it's pretty OPS!
Quote:
Originally Posted by SnoW View Post
Anyway, one big.
Here I meant exactly what you are saying, it's better for the server performance to combine them(one big).
Quote:
Originally Posted by Exolent[jNr] View Post
Not completely true.
If there are multiple plugins using frequently-called forwards (such as PreThink, ServerFrame, etc.), then it is better to combine them.
Otherwise, it doesn't make much of a difference.
Don't know what there wasn't completely true in my post, maybe you'll tell me.
SnoW is offline
Send a message via MSN to SnoW
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:40.


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