03.11.2015, 18:01
Hello, if 2400+ accounts created in the SQL database, the command /factios no works. I say: "SERVER: Unknown Command."
Код HTML:
CMD:factions(playerid, params []) { new id, tmp[270], string[1155]; sscanf(params, "u", id); if(pInfo[playerid][pAdmin] < 6) { if (isnull(params)) { format(tmp, sizeof(tmp), "Faction\tLocation\tLeader\n"); strcat(string, tmp); format(tmp, sizeof(tmp), "Police Department\tLos Santos\t%s\n", GetFactionLeader(1)); strcat(string, tmp); format(tmp, sizeof(tmp), "Federal Bureau of Investigations\tLos Santos\t%s\n", GetFactionLeader(2)); strcat(string, tmp); format(tmp, sizeof(tmp), "National Guard\tLas Venturas\t%s\n", GetFactionLeader(3)); strcat(string, tmp); format(tmp, sizeof(tmp), "Paramedics Department\tLos Santos\t%s\n", GetFactionLeader(4)); strcat(string, tmp); format(tmp, sizeof(tmp), "Taxi LS\tLos Santos\t%s\n", GetFactionLeader(5)); strcat(string, tmp); format(tmp, sizeof(tmp), "News Reporter\tLas Venturas\t%s\n", GetFactionLeader(6)); strcat(string, tmp); format(tmp, sizeof(tmp), "School Instructor\tLos Santos\t%s\n", GetFactionLeader(7)); strcat(string, tmp); format(tmp, sizeof(tmp), "Hitman\tLos Santos\t%s\n", GetFactionLeader(8)); strcat(string, tmp); format(tmp, sizeof(tmp), "Grove Street\tLos Santos\t%s\n", GetFactionLeader(9)); strcat(string, tmp); format(tmp, sizeof(tmp), "The Ballas\tLos Santos\t%s\n", GetFactionLeader(10)); strcat(string, tmp); format(tmp, sizeof(tmp), "agos\tLos Santos\t%s\n", GetFactionLeader(11)); strcat(string, tmp); format(tmp, sizeof(tmp), "Russian Mafia\tLas Venturas\t%s\n", GetFactionLeader(12)); strcat(string, tmp); } } return 1; }
Код HTML:
GetFactionLeader(id) { new query[200]; mysql_format(MySQLCon, query, sizeof (query), "SELECT user, ID, LastLogin FROM `players` WHERE `Leader` = '%i'", id); new name[MAX_PLAYER_NAME+15], idp, Cache:result = mysql_query(MySQLCon, query); if(cache_num_rows()) { cache_get_field_content(0, "user", name); idp = cache_get_field_content_int(0, "ID"); cache_get_field_content(0, "LastLogin", sLeaderF), strmid(pInfo[idp][pLastLogin], sLeaderF, 0, 255, 255); if(IsPlayerConnected(ReturnUser(name))) { format(name, sizeof (name), "%s (Online)", name); } else { format(name, sizeof (name), "%s (Offline)", name); } } else { format(name, sizeof (name), "No Leader"); sLeaderF = "-"; } cache_delete(result); return name; }