Limit Account?
#1

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;
}
Reply


Messages In This Thread
Limit Account? - by norton2 - 03.11.2015, 18:01
Re: Limit Account? - by Vince - 03.11.2015, 18:22
Re: Limit Account? - by norton2 - 04.11.2015, 13:24
Re: Limit Account? - by norton2 - 04.11.2015, 13:26
Re: Limit Account? - by Vince - 04.11.2015, 15:32
Re: Limit Account? - by norton2 - 04.11.2015, 17:58
Re: Limit Account? - by norton2 - 05.11.2015, 15:36
Re: Limit Account? - by Vince - 05.11.2015, 21:31
Re: Limit Account? - by norton2 - 06.11.2015, 14:10
Re: Limit Account? - by norton2 - 07.11.2015, 10:27

Forum Jump:


Users browsing this thread: 2 Guest(s)