26.07.2018, 16:40
Код:
Admini(playerid, typ) { new vypis[(MAX_PLAYER_NAME+32)*30+16]; new query[80]; new caption[16]; if (typ == 0) { mysql_format(handle, query, sizeof(query), "SELECT * FROM `ASystem` WHERE hodnost >=2 AND prihlaseny=1 ORDER BY hodnost DESC"); format(caption, sizeof(caption), "Online admini"); } else if (typ == 1) { mysql_format(handle, query, sizeof(query), "SELECT * FROM `ASystem` WHERE hodnost >=2 ORDER BY hodnost DESC"); format(caption, sizeof(caption), "Vљetci admini"); } mysql_query(handle, query); format(vypis, 16, "Nick\tHodnost\n"); new n[MAX_PLAYER_NAME]; new rowCount; cache_get_row_count(rowCount); for (new i = 0; i < rowCount; i++) { cache_get_value(i, "nick", n, handle); format(vypis, sizeof(vypis), "%s%s\t%s\n", vypis, n, hodnosti[cache_get_value_name_int(i, "hodnost", handle)]); } ShowPlayerDialog(playerid, DIALOG_VYPIS, DIALOG_STYLE_TABLIST_HEADERS, caption, vypis, "Ok", ""); }
Quote:
LINE : cache_get_value(i, "nick", n, handle); format(vypis, sizeof(vypis), "%s%s\t%s\n", vypis, n, hodnosti[cache_get_value_name_int(i, "hodnost", handle)]); ERROR : error 017: undefined symbol "cache_get_value" |
Quote:
Prihlas(playerid, const sheslo[]) { new heslo[64]; mysql_escape_string(sheslo, heslo, handle); if (!KontrolaHesla(playerid, heslo)) return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Prihlбsenie", "{ff0000}Zadal si nesprбvne heslo!\n{ffffff}Zadaj svoje heslo", "Ok", "Zruљ"); new query[64+MAX_PLAYER_NAME]; mysql_format(handle, query, sizeof(query), "UPDATE `ASystem` SET prihlaseny=1 WHERE nick='%s'", Meno(playerid)); mysql_query(handle, query); HracoveUdaje[playerid][prihlaseny] = true; mysql_format(handle, query, sizeof(query), "SELECT * FROM `ASystem` WHERE nick = '%s'", Meno(playerid)); mysql_query(handle, query); HracoveUdaje[playerid][hodnost] = cache_get_value_name_int(0, "hodnost", handle); ShowPlayerDialog(playerid, DIALOG_VYPIS, DIALOG_STYLE_MSGBOX, "Prihlбsenie", "Ъspeљne prihlбsenэ.", "Ok", ""); return 1; } |
Quote:
LINE : HracoveUdaje[playerid][hodnost] = cache_get_value_name_int(0, "hodnost", handle); ERROR : error 017: undefined symbol "cache_get_value_name_int" |