Money update
#1

I make a rly eazy /dice sistem , all work good but when i use /stats my money don't update if i win or lose at dice.
If i enter on server and i have 100kk , and i lose all at dice , in /stats will be 100kk. DOn't update the money.
Код:
CMD:dice1(playerid)
{
	new dice = 1 + random(2);
    if(dice == 1)
	{
	SendClientMessage(playerid,-1,"A picat un numar impar.");
	SendClientMessage(playerid,-1,"Ai pierdut 1.000.000");
	GivePlayerMoney(playerid , -1000000);
    return 1;
	}
	else if(dice == 2)
	{
	SendClientMessage(playerid,-1,"A picat un numar par.");
	SendClientMessage(playerid,-1,"Ai castigat 1.000.000");
	GivePlayerMoney(playerid , 1000000);
    return 2;
	}
	return 1;
}
Код:
CMD:stats(playerid, params[])
{
  new string[500],name[MAX_PLAYER_NAME];
  GetPlayerName(playerid, name, sizeof(name));
  format(string, sizeof(string), "{4286f4}Name{FFFFFF}: %s\n{4286f4}Admin Level{FFFFFF}: %i\n{4286f4}Money{FFFFFF}: %i",name, PlayerInfo[playerid][pAdmin],  PlayerInfo[playerid][pCash]);
  SendClientMessage(playerid,-1,string);
  return 1;
}
what to do? Sry my bad english.
Reply


Messages In This Thread
Money update - by Calinut200 - 26.10.2018, 21:29
Re: Money update - by KinderClans - 26.10.2018, 21:36
Re: Money update - by Calinut200 - 26.10.2018, 21:43
Re: Money update - by KinderClans - 26.10.2018, 21:49
Re: Money update - by Calinut200 - 26.10.2018, 21:55
Re: Money update - by KinderClans - 26.10.2018, 21:56
Re: Money update - by Calinut200 - 26.10.2018, 22:32
Re: Money update - by kristo - 27.10.2018, 00:49
Re: Money update - by KinderClans - 27.10.2018, 01:00
Re: Money update - by kristo - 27.10.2018, 01:38

Forum Jump:


Users browsing this thread: 1 Guest(s)