Help With Getting Percentage
#2

PHP код:
#include <a_samp>
#include <YSI\y_va>
new money GetPlayerMoney(playerid);
new 
Float:percent GetPercentageOfMoney(playerid120); 
// Will take %20 of the player's money and store it to "percent"
GivePlayerMoney(playerid, -floatround(percent));
SCMEx(playerid, -1"You've death ! You've lost %%%f of your money ($%d)"percentfloatround(percent));
Float:GetPercentageOfMoney(playeridFloat:percents)
{
    return 
floatdiv(floatmul(GetPlayerMoney(playerid), percents), 100);
}
SCMEx(playeridcolour, const message[], va_args<>)
{
    new 
out[145];
    
va_format(outsizeof(out), messageva_start<3>);
    return 
SendClientMessage(playeridcolourout);

Reply


Messages In This Thread
Help With Getting Percentage - by AroseKhanNiazi - 23.05.2014, 10:59
Re : Help With Getting Percentage - by S4t3K - 23.05.2014, 11:05
Re: Help With Getting Percentage - by AroseKhanNiazi - 23.05.2014, 11:08
Re : Help With Getting Percentage - by S4t3K - 23.05.2014, 11:10
Re: Help With Getting Percentage - by AroseKhanNiazi - 23.05.2014, 11:12
Re: Re : Help With Getting Percentage - by RajatPawar - 23.05.2014, 12:04
Re : Help With Getting Percentage - by S4t3K - 23.05.2014, 12:06
Re: Help With Getting Percentage - by AroseKhanNiazi - 23.05.2014, 12:28
Re : Help With Getting Percentage - by S4t3K - 23.05.2014, 12:49
Re : Help With Getting Percentage - by S4t3K - 23.05.2014, 15:27

Forum Jump:


Users browsing this thread: 3 Guest(s)