[HELP]Floatdiv & Floatadd (HELP-ME BEST SCRIPTERS =D) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP]Floatdiv & Floatadd (HELP-ME BEST SCRIPTERS =D) (
/showthread.php?tid=96405)
[HELP]Floatdiv & Floatadd (HELP-ME BEST SCRIPTERS =D) -
Naty - 07.09.2009
can someone help me with this? How to use floatdiv and floatadd?. Some good scripter, could you me explain? If possible give me an example. Do not send me a link to the wiki. Because it did not help me at nothing.
Please, help me!
Re: [HELP]Floatdiv & Floatadd -
Naty - 07.09.2009
none of the major scripters can me explain?
******?,
luxurion?,
james_alex?,
seif?,
sandra?,
kye?,
backwardsman97?,
zezombia?,
raf?
lethal?,
zeruel_angel?,
mikep?
the best scripters can not know me explain? (sorry, for double post)
Re: [HELP]Floatdiv & Floatadd (HELP-ME BEST SCRIPTERS =D) -
woot - 07.09.2009
https://sampwiki.blast.hk/wiki/Scripting...s_Old#floatadd
https://sampwiki.blast.hk/wiki/Scripting...s_Old#floatdiv
Re: [HELP]Floatdiv & Floatadd (HELP-ME BEST SCRIPTERS =D) -
iLinx - 08.09.2009
lol what part do you not understand O.o
ive only used this a couple of times
im not sure what you could exactly use floatadd for , but heres an example
Код:
new Float:totalpos = floatadd(25.100, 62.124);
this will make
totalpos equal 87.224
floatdiv. Im going to use KDR(kill death ratio) as an example for this
Код:
dcmd_kdr(playerid, params[]) {
#pragma unused params
new Float:KillDeath = floatdiv(kills[playerid], deaths[playerid]);
new str[128]; format(str, sizeof(str), "Your kdr is %0.2f", KillDeath);
return SendClientMessage(playerid, your_color, str);
}
that will calculate the kill death ratio of the player by dividing the kills by the deaths and returning it rounded to 2 decimal points ( as done in most fps games)
Re: [HELP]Floatdiv & Floatadd (HELP-ME BEST SCRIPTERS =D) -
saiberfun - 08.09.2009
thats like only getting back all the elementary school time XD
so dude just watch the wiki then u should understand it
its really just usual elementary schoolcalculating
Re: [HELP]Floatdiv & Floatadd (HELP-ME BEST SCRIPTERS =D) -
Naty - 08.09.2009
thanks for explication! I did not understand = (