Drunk Level -
GaGlets(R) - 08.08.2010
I am just trying to get Drunk Level shown as decimal
pawn Код:
new alko = GetPlayerDrunkLevel(pid) / 10000;
format(string,sizeof(string),"* Personai asinīs ir %d promiles alkohola.",alko);
SendClientMessage(playerid,COLOR_WHITE,string);
To understand better it is showing my drunk level without "." i want to show that like this "0.1" but all time it shows up without "."
I know noone understood me..

Just bad english today..
Re: Drunk Level -
DiddyBop - 08.08.2010
pawn Код:
format(string,sizeof(string),"* Personai asinīs ir %.d promiles alkohola.",alko);
Not sure if will work tho.
Re: Drunk Level -
ev0lution - 08.08.2010
pawn Код:
new Float:alko = GetPlayerDrunkLevel(pid) / 10000;
format(string,sizeof(string),"* Personai asinīs ir %f promiles alkohola.",alko);
SendClientMessage(playerid,COLOR_WHITE,string);
Re: Drunk Level -
Loppa - 08.08.2010
Try this:
Код:
new Float:alko = GetPlayerDrunkLevel(pid) / 10000;
format(string,sizeof(string),"* Personai asinīs ir %f promiles alkohola.",alko);
SendClientMessage(playerid,COLOR_WHITE,string);
Re: Drunk Level -
GaGlets(R) - 08.08.2010
No that is showing the same but with .00000
these .00000 wont change ammount..
Re: Drunk Level -
ikey07 - 08.08.2010
Ak mans dievs, tu to drunk leveli dali ar 10k, un tā iznākums ir drausmīgi mazs, pat zem 0.00000001, Drunk Levelis pats automātiski ņemās nost pa kādiem 500 vienā sekundē, tev vajag to flaotu izprintēt kā %0.1f, lai printētu tikai vienu ciparu aiz komata.
ceru ka saprati.
Re: Drunk Level -
GaGlets(R) - 08.08.2010
Ak dievs tu nepareizi domā...
Drunk level max ir 50k
25 ņemas nost katru sekundi..
Es sev uzlieku drunk level 1000 un vajadzētu būt 0.1 ut..t
drunk efekts sākas no 2k no 10k pazūd mapes ikona..
--------------------------------------- in english---------------
Drunk Level max is 50k
25 levels is taking off each sec.
i set my drunk level oveer 1k and it should show 0.1....
So my problem is, it wont sho numbers behind decimal ""1.0000"
Using float.
Re: Drunk Level -
FireCat - 08.08.2010
its hard to xplain i cant really get it
Re: Drunk Level -
ikey07 - 08.08.2010
Drunk level isnt float, its decimal, so you need to use %d, but %d can't show digits behind comat, so you need to convert drunk level to float to print 0.1 etc
or just print format . .. . "Drunk level: 0.%d",GetPlayerDrunkLevel(playerid)/1000);
Re: Drunk Level - Guest3598475934857938411 - 11.08.2010
FireCat, i'm bored of stupid posts your posting like if SA-MP checks them, you have like 5 that are valid... You need to stop wasting my time BTW i'm reporting you to SA-Mp for being such a time water...
---Thanks---
ExpertProgrammer