Posts: 1,349
Threads: 194
Joined: Jan 2014
Reputation:
0
How do i get percentage of something in samp
like like over deaths
and other ... getting his total money and taking away any percentage of money form him
Posts: 1,349
Threads: 194
Joined: Jan 2014
Reputation:
0
and what if i want to give that percent to another player ??
Posts: 864
Threads: 57
Joined: Jan 2013
Reputation:
0
Use the function to get the player money, then use GivePlayerMoney combined to floatround(percent) (returns an integer from a float parameter) to give the percentage to the other player.
Posts: 864
Threads: 57
Joined: Jan 2013
Reputation:
0
Multiplying an integer by a float usually doesn't work with the usual *.
Posts: 864
Threads: 57
Joined: Jan 2013
Reputation:
0
Use the one you want then.
Both are working.
Posts: 864
Threads: 57
Joined: Jan 2013
Reputation:
0
But the percentages are calculated if you divide per 100 then you multiply by a number, aren't ?
I've always used the floatxxx operations because when I've began, I tried with the basic operations then it didn't work. So if I've told something wrong, please excuse me.