12.06.2014, 16:14
(
Последний раз редактировалось AroseKhanNiazi; 12.06.2014 в 18:19.
)
pawn Код:
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(pInfo[i][Donator] != 1)
{
new randomplayers = random(online);
if(pInfo[randomplayers][BankMoney] > 300000)
{
new tax = pInfo[randomplayers][BankMoney]/100;
new Float:tax1 = tax*2.75;
pInfo[randomplayers][Money] -=tax1;
format(string,sizeof(string),"You have paid $%d in tax.",tax1);
SCM(randomplayers,COLOR_SKYBLUE,string);
format(string,sizeof(string),"%s (%d) has paid paid $%d in taxes.",pInfo[randomplayers][playername],randomplayers,tax1);
SCMA(COLOR_SKYBLUE,string);
pInfo[randomplayers][taxes_paid] += tax1;
AUTO_SAVE(randomplayers);
}
}
if(pInfo[i][Donator] == 1)
{
new rand =random(3);
switch(rand)
{
case 0,1:
{
new randomplayers = random(online);
if(pInfo[randomplayers][BankMoney] > 300000)
{
new tax = pInfo[randomplayers][BankMoney]/100;
new Float:tax1 = tax*1.2;
pInfo[randomplayers][Money] -=tax1;
format(string,sizeof(string),"You have paid $%d in tax.",tax1);
SCM(randomplayers,COLOR_SKYBLUE,string);
format(string,sizeof(string),"%s (%d) has paid paid $%d in taxes.",pInfo[randomplayers][playername],randomplayers,tax1);
SCMA(COLOR_SKYBLUE,string);
pInfo[randomplayers][taxes_paid] += tax1;
AUTO_SAVE(randomplayers);
}
}
case 2:
{
new randomplayers = random(online);
SCM(randomplayers,COLOR_SKYBLUE,"Your Donator Status Save You From Taxes");
}
}
}
}
i want that the server should take the tax from random people and the random person should have at-lest 300000 in their bank then it should take the money from them thinking money will go in - becz taking form their hand i have that soultion just the problem its not working it took more cash than they even had in total (bank+hand) all the things occurred at the same time for all players
i mean that it showed the msg
Your Donator Status Save You From Taxes
and even took taxes first the non donator way then the donator way