Getting the size difference between 2 functions - 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)
+--- Thread: Getting the size difference between 2 functions (
/showthread.php?tid=313781)
Getting the size difference between 2 functions -
milanosie - 27.01.2012
So, Simple question here, dont know if the awnser is simple tho..
How do I get the difference between A and B
Example:
A[playerid] = 501
B[playerid] = variable but at this moment 721
How do I get the difference between A and B?
Re: Getting the size difference between 2 functions -
[XST]O_x - 27.01.2012
What do you mean?
B[playerid]-A[playerid]?
if(B[playerid] > A[playerid])?
if(B[playerid] != A[playerid])?
What do you mean by difference?
Re: Getting the size difference between 2 functions -
RyDeR` - 27.01.2012
Код:
Difference = abs(A[playerid] - B[playerid]);
Re: Getting the size difference between 2 functions -
milanosie - 27.01.2012
I want to show the player the difference between Number a and number b
Other example:
money1[playerid]
money2[i]
money1 is the player his money
money2 is the money of the player that is called in the command.
I want to show the difference between their money
Re: Getting the size difference between 2 functions -
[XST]O_x - 27.01.2012
Quote:
Originally Posted by milanosie
I want to show the player the difference between Number a and number b
Other example:
money1[playerid]
money2[i]
money1 is the player his money
money2 is the money of the player that is called in the command.
I want to show the difference between their money
|
Then in that case, like RyDer said:
pawn Код:
new Difference = floatabs(money1[playerid] - money2[i]);
Re: Getting the size difference between 2 functions -
milanosie - 27.01.2012
Quote:
Originally Posted by RyDeR`
Код:
Difference = abs(A[playerid] - B[playerid]);
|
hmm quiet easy-.-
did not think of that

thanks