22.06.2016, 19:42
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:
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");
}
}

