26.10.2018, 21:29
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.
what to do? Sry my bad english.
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; }