29.11.2016, 00:09
(
Последний раз редактировалось OneDay; 29.11.2016 в 23:03.
)
Some day I learned operator:
And made a conversion:
I now make more conversions:
http://pastebin.com/eCb7tir1
Example:
In the server gives.
You can convert.
Milliseconds
Seconds
Minutes
Hours
Days
Weeks
Kelvin
Celcius
Millimetres
Centimetres
Metres
Kilometres
Units
Precision_Units
Square_Millimetres
Square_Centimetres
Square_Metres
Square_Kilometres
Hectares
Grammes
Kilogrammes
Tonnes
Millilitres
Litres
Cubic_Centimetres
Cubic_Metres
Units are from GTA.
Four types are:
weight
volume
area
distance
But you cannt combine as:
Maybe soon yes.
PHP код:
ones: operator=(a)
return ones: ( (a >= 0) ? a : ~(-a) )
PHP код:
Milliseconds: operator=(Seconds:a)
return Milliseconds: ( _:a * 1000 );
new Milliseconds:a = Seconds:5;
printf("%d", _:a);
// 5000
http://pastebin.com/eCb7tir1
Example:
PHP код:
#include <a_samp>
#include <conversions>
main()
{
new Millimetres:mm = Millimetres:25.4 + Metres:1.0;
printf("%f millimetres",Float:mm);
new Celcius:cc = Celcius:10.0 + Kelvin:10.0;
printf("%f celcius",Float:cc);
new Tonnes:ww = Tonnes:10.0 * 90;
printf("%f tonnes",Float:ww);
}
PHP код:
1025.4 millimetres
Milliseconds
Seconds
Minutes
Hours
Days
Weeks
Kelvin
Celcius
Millimetres
Centimetres
Metres
Kilometres
Units
Precision_Units
Square_Millimetres
Square_Centimetres
Square_Metres
Square_Kilometres
Hectares
Grammes
Kilogrammes
Tonnes
Millilitres
Litres
Cubic_Centimetres
Cubic_Metres
Units are from GTA.
Four types are:
weight
volume
area
distance
But you cannt combine as:
PHP код:
new Square_Metres:area = Metres:5.0 * Metres:2.0;