2019-05-06, 09:10 PM
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 :
*i dont receive any error the only problem is that i have to relog to have my money
CODE :
Code:
?for(new i, j = cache_get_row_count (); i < j; i) {
? ? ? ?cache_get_field_content(i, "name", szResult); format(name, 256, szResult);
? ? ? ?cache_get_field_content(i, "Money", moneyss);
? ? ? ?new money = strval(moneyss);
? ? ? ?x;
? ? ? ?new szQuery2[256];
? ? ? ?mysql_format(SQL, szQuery2, sizeof(szQuery2), "UPDATE `users` SET `Money`='%d' WHERE `name`='%s'", money, name);
? ? ? ?mysql_tquery(SQL,szQuery2, "", "");
? ? ?
? ? ? ?format(string, sizeof(string), "{FFFFFF}The winner is: {FF0000}%s", name);
? ? ? ?MsjL(COLOR_WHITE, string);
? ?}
*i dont receive any error the only problem is that i have to relog to have my money