[Pawn] mysql server problem - Printable Version + open.mp forum (https://forum.open.mp) -- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3) --- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10) --- Thread: [Pawn] mysql server problem (/showthread.php?tid=527) |
mysql server problem - Trox - 2019-05-06 yo guys . ive tried to make a lottery system in the past few hours but the problem is that i save the variable in mysql all ok. The thing is that i have to relog to see my money . Anyone knows how can i save it and at the same time have it *instantly* on the server? CODE : Code: ?for(new i, j = cache_get_row_count (); i < j; i) { *i dont receive any error the only problem is that i have to relog to have my money RE: mysql server problem - JustMichael - 2019-05-06 That would be because you need to call `GivePlayerMoney` with the variable `money` so the player see's the amount. Normally you would store the amount of money a player as in a variable and so something like this Code: new money = 5000; of course no sane person would do it like that, and would instead have a function that does this correctly. RE: mysql server problem - unix - 2019-05-08 ^ Use that as above when a player respawns or dies or whatsoever, else you can just function a loop every 5 minutes (or if u have any loop that goes through connected players) example: Code: for(new i = 0; i != MAX_PLAYERS; i) |