SA-MP Forums Archive
Offline help +REP - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Offline help +REP (/showthread.php?tid=529586)



Offline help +REP - Spartaaaaa - 02.08.2014

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



Re: Offline help +REP - Spartaaaaa - 03.08.2014

bump


Re: Offline help +REP - PawnOX - 03.08.2014

Maybe that "return minfo" try return 1


Re: Offline help +REP - Spartaaaaa - 03.08.2014

bump


Re: Offline help +REP - ronyx69 - 03.08.2014

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)



Re: Offline help +REP - Spartaaaaa - 03.08.2014

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


Re: Offline help +REP - Spartaaaaa - 03.08.2014

bump


Re: Offline help +REP - Spartaaaaa - 03.08.2014

bump


Re: Offline help +REP - Spartaaaaa - 03.08.2014

bump


Re: Offline help +REP - Spartaaaaa - 03.08.2014

bump#$%@#$%@#45