RealGaming 1 Odesláno: 20. Listopad Share Odesláno: 20. Listopad Ahoj chci se zeptat, jestli v tomhle kodu je potřeba volat cache_delete() - dole.. ? ```//PlayerData stock LoadDataPlayer(playerid) { new query[358]; mysql_format(DB_realgaming, query, sizeof(query), "SELECT * FROM PlayerData WHERE `NickName` = '%s'", PlayerName(playerid)); mysql_query(DB_realgaming, query); if(cache_num_rows() > 0) { //Informace o hráči ve hře cache_get_value_name(0, "Email", SaveData[playerid][EmailSave],64); cache_get_value_int(0, "Zabit", SaveData[playerid][ZabitHrac]); cache_get_value_int(0, "Zabil", SaveData[playerid][ZabilHrace]); cache_get_value_int(0, "Penize", SaveData[playerid][MoneySave]); cache_get_value_int(0, "Banka", SaveData[playerid][BankaSave]); cache_get_value_int(0, "Skin", SaveData[playerid][Skin]); cache_get_value_int(0, "AdminLevel", SaveData[playerid][AdminLevel]); cache_get_value_int(0, "VIP", SaveData[playerid][VIPHrac]); cache_get_value_int(0, "XP", SaveData[playerid][XPHrac]); cache_get_value_int(0, "Zamestnani", SaveData[playerid][Zamestnani]); cache_get_value_int(0, "Odehrano", SaveData[playerid][CelkemOdehrano]); cache_get_value_int(0, "Vezeni", SaveData[playerid][VezeniCas]); cache_get_value_int(0, "WL", SaveData[playerid][WantedLevel]); } return 1; }``` Díky. Link to comment Share on other sites More sharing options...
0 Globální moderátor Hip 196 Odesláno: 20. Listopad Globální moderátor Share Odesláno: 20. Listopad Ano, pokud to neni INSERT nebo UPDATE, je potreba cistka cache. stock LoadDataPlayer(playerid) { new query[358]; mysql_format(DB_realgaming, query, sizeof(query), "SELECT * FROM PlayerData WHERE `NickName` = '%s'", PlayerName(playerid)); mysql_query(DB_realgaming, query); if (cache_num_rows() > 0) { // Informace o hráči ve hře cache_get_value_name(0, "Email", SaveData[playerid][EmailSave], 64); cache_get_value_int(0, "Zabit", SaveData[playerid][ZabitHrac]); cache_get_value_int(0, "Zabil", SaveData[playerid][ZabilHrace]); cache_get_value_int(0, "Penize", SaveData[playerid][MoneySave]); cache_get_value_int(0, "Banka", SaveData[playerid][BankaSave]); cache_get_value_int(0, "Skin", SaveData[playerid][Skin]); cache_get_value_int(0, "AdminLevel", SaveData[playerid][AdminLevel]); cache_get_value_int(0, "VIP", SaveData[playerid][VIPHrac]); cache_get_value_int(0, "XP", SaveData[playerid][XPHrac]); cache_get_value_int(0, "Zamestnani", SaveData[playerid][Zamestnani]); cache_get_value_int(0, "Odehrano", SaveData[playerid][CelkemOdehrano]); cache_get_value_int(0, "Vezeni", SaveData[playerid][VezeniCas]); cache_get_value_int(0, "WL", SaveData[playerid][WantedLevel]); } cache_delete(); return 1; } Link to comment Share on other sites More sharing options...
0 RealGaming 1 Odesláno: 22. Listopad Author Share Odesláno: 22. Listopad @HipAno. Ale musim definovat o jaky cache se jedná.. takze new Cache:cache; cache = mysql_query(DB_realgaming, query) a cache_delete(cache); je to tak ne? Link to comment Share on other sites More sharing options...
0 Globální moderátor Hip 196 Odesláno: 22. Listopad Globální moderátor Share Odesláno: 22. Listopad presne tak Link to comment Share on other sites More sharing options...
Dotaz
RealGaming 1
Ahoj chci se zeptat, jestli v tomhle kodu je potřeba volat cache_delete() - dole.. ?
```//PlayerData
stock LoadDataPlayer(playerid)
{
new query[358];
mysql_format(DB_realgaming, query, sizeof(query), "SELECT * FROM PlayerData WHERE `NickName` = '%s'", PlayerName(playerid));
mysql_query(DB_realgaming, query);
if(cache_num_rows() > 0)
{
//Informace o hráči ve hře
cache_get_value_name(0, "Email", SaveData[playerid][EmailSave],64);
cache_get_value_int(0, "Zabit", SaveData[playerid][ZabitHrac]);
cache_get_value_int(0, "Zabil", SaveData[playerid][ZabilHrace]);
cache_get_value_int(0, "Penize", SaveData[playerid][MoneySave]);
cache_get_value_int(0, "Banka", SaveData[playerid][BankaSave]);
cache_get_value_int(0, "Skin", SaveData[playerid][Skin]);
cache_get_value_int(0, "AdminLevel", SaveData[playerid][AdminLevel]);
cache_get_value_int(0, "VIP", SaveData[playerid][VIPHrac]);
cache_get_value_int(0, "XP", SaveData[playerid][XPHrac]);
cache_get_value_int(0, "Zamestnani", SaveData[playerid][Zamestnani]);
cache_get_value_int(0, "Odehrano", SaveData[playerid][CelkemOdehrano]);
cache_get_value_int(0, "Vezeni", SaveData[playerid][VezeniCas]);
cache_get_value_int(0, "WL", SaveData[playerid][WantedLevel]);
}
return 1;
}```
Díky.
Link to comment
Share on other sites
3 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now