Offline help +REP
#1

Hi guys when i'm online but it's show offline on dialoge? pls help

pawn Код:
stock GetClanMembers(clan[])
{
    new CQuery[200], minfo[1512];
    //--------------------------------------------------------------------------
    format(CQuery, sizeof(CQuery), "SELECT * FROM `members` WHERE `clanname` = '%s' ORDER BY `isinclan` DESC LIMIT 15", clan);
    Result = db_query(Database, CQuery);
    //--------------------------------------------------------------------------
    for(new i; i < db_num_rows(Result); i++)
    {
        new string[30], string5[30], onoff[10], log[2];
        //----------------------------------------------------------------------
        db_get_field_assoc(Result, "playername", string, 30);
        db_get_field_assoc(Result, "playerclanrank", string5, 30);
        db_get_field_assoc(Result, "IsOnline", log, 2);
        //----------------------------------------------------------------------
        if(strcmp(log, "0") == 0)
        {
            onoff = "Offline";
        }
        else if(strcmp(log, "1") == 0)
        {
            onoff = "Online";
        }
        //----------------------------------------------------------------------
        format(minfo,sizeof(minfo),"{00FF00}%s\n%s {FFFFFF}(Rank: {00FF00}%s) {00FF00}(%s)" ,minfo, string, string5, onoff);
        db_next_row(Result);
    }
    db_free_result(Result);
    return minfo;
}
Reply
#2

bump
Reply
#3

Maybe that "return minfo" try return 1
Reply
#4

bump
Reply
#5

What's in that log and why is it [2] ? If it's just a number you could use strval(log) to see if it is 0 or 1:
Код:
if(strval(log)==1)
Reply
#6

When i create group on my dialoge status is ONLINE when i reloging then my dialoge status OFFLINE
Reply
#7

bump
Reply
#8

bump
Reply
#9

bump
Reply
#10

bump#$%@#$%@#45
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)