19.06.2014, 09:01
I have a problem with random money.
When a player finish a particular job, he should earn random money, but he doesn't earn nothing.
I will explain: when this player enter on finish checkpoint, he appear a message for example that says: "You have earned $320." But the dollars text at the top stay stationary, because in truth he earn 0$. The only thing that work is SendClientMessage, but GivePlayerMoney doesn't work and I don't understand why.
Here is the code:
When a player finish a particular job, he should earn random money, but he doesn't earn nothing.
I will explain: when this player enter on finish checkpoint, he appear a message for example that says: "You have earned $320." But the dollars text at the top stay stationary, because in truth he earn 0$. The only thing that work is SendClientMessage, but GivePlayerMoney doesn't work and I don't understand why.
Here is the code:
Код:
new randommoney = random((300-500)+500);
switch (randommoney)
{
case 0:
{
GivePlayerMoney(playerid, randommoney);
}
}
new string[256];
format(string, sizeof(string), "You have finished the job and you have earned $%d!", randommoney);
SendClientMessage(playerid, GIALLO, string);

