Random Money doesn't work
#1

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:
Код:
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);
Reply
#2

I fixed myself, if you can help, that is what i have did:
Код:
new randommoney = random(700);
  	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);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)