Taking too much money
#1

Hi,
I made an advertising command and set the price to $500. The problem is that it takes $2500 instead of $500. And if the price is $800 it takes $2600. What's the problem? Here is the code of the advertising part:
Код:
    if (strlen(params) > 64)
	{
                foreach (new i : Player)
		{
		       SendClientMessageEx(i, COLOR_GREEN, "[Advertisement]: %.64s", params);
		       SendClientMessageEx(i, COLOR_GREEN, "...%s | Ph: %d", params[64], PlayerData[playerid][pPhone]);
			GiveMoney(playerid, -500);
			Advertisements = 0;
			SetTimerEx("AllowAdvertisements", 30000, false, "i");
		}
	}
	else
	{
                foreach (new i : Player)
		{
		        SendClientMessageEx(i, COLOR_GREEN, "[Advertisement]: %s | Ph: %d", params, PlayerData[playerid][pPhone]);
			GiveMoney(playerid, -500);
			Advertisements = 0;
			SetTimerEx("AllowAdvertisements", 30000, false, "i");
		}
	}
Reply


Messages In This Thread
Taking too much money - by GoldenLion - 22.06.2016, 19:42
Re: Taking too much money - by Vince - 22.06.2016, 19:56
Re: Taking too much money - by Konstantinos - 22.06.2016, 20:05
Re: Taking too much money - by GoldenLion - 23.06.2016, 08:57

Forum Jump:


Users browsing this thread: 1 Guest(s)