23.06.2018, 02:37
Hello, I'm facing a problem as usual XD, I've declared a global variable for Money bag as the enum was causing problem with value 0 or 1..
Here's the code
When I add these commented lines, neither does it give me money, nor does it sends a client message.
But when they are again COMMENTED, it works smooth..
Also, about the random money, in the first case, i want it to be 1600 - 2500.. I did use RandomEx, but it gave some errors.. so i switched back to this..
Here's the code
Код:
// if(pMoneyBag == 1)
// {
new RandMoney = random(2669);
GivePlayerMoney(playerid, RandMoney);
new msg[128], sName[24];
GetPlayerName(playerid, sName, 24);
format(msg, 128, "%s(%d) has robbed $%d.", sName, playerid, RandMoney);
SendClientMessageToAll(-1, msg);
// }
/* else if(pMoneyBag == 1)
{
new RandMoney = random(4969);
GivePlayerMoney(playerid, RandMoney + 4969);
new msg[128], sName[24];
GetPlayerName(playerid, sName, 24);
format(msg, 128, "%s(%d) has robbed $%d.", sName, playerid, RandMoney);
SendClientMessageToAll(-1, msg);
}
*/
But when they are again COMMENTED, it works smooth..
Also, about the random money, in the first case, i want it to be 1600 - 2500.. I did use RandomEx, but it gave some errors.. so i switched back to this..


MoneyBag[MAX_PLAYERS]