Hello,
I'm facing a stupid problem ...
I'm creating a program that allows players to get all weapon ammo free.
To do that, i check when they can by (between the respawn and the end of buytime) : freezetime + buytime
So i did that :
Code:
new mp_buytime;
new mp_freezetime;
mp_buytime=get_cvar_num("mp_buytime"); // 0.25
mp_freezetime=get_cvar_num("mp_freezetime"); // 10
I want to know the total duration in second.
Since buytime is in minutes, i did that to get in seconds :
Code:
new buytime_total;
buytime_total=(mp_buytime*60)+mp_freezetime;
When i try to use the buytime_total var, it's not set to the right value (it's not (0.25*60)+10)
Both vars are float ... and i'm bored by float !
So the question is :
Is there an easy way to convert between float and int ?
I'm only using <amxmodx> and <cstrike> includes, and i would like as much as possible to not use other files.
Thank you for your help.