[HELP] mysql offline chech player
#1

So in command offprison I have check for example if I type some none existing account then it says that there's no player with that name which is fine but when I check existing player I mean when I wanna get offprison someone player who is name in database it's again says that account doesn't exist but that acc is in database so this is that check:


pawn Код:
cache_get_data(rows,fields,mysql);
        if(!rows)
        {
            SCMF(playerid,0xDB023EFF,"G-Protect:No sucess! Account %s doens't exist in our database!",name);
            return 1;
        }

and one more question it's not related with this one how can I check someone player offline data for example lvl or money and his last activity on server ? thanks
Reply
#2

We probably don't use the same MySQL plugin, but try taking a look at this:
pawn Код:
format(Query, 500, "SELECT `nick` FROM `playerdata` WHERE `nick` COLLATE latin1_general_cs = '%s' LIMIT 1", pInfo[playerid][Nick]); // here we are selecting the name of the player who logged in from the database.
            mysql_query(Query); // we query the statement above
            mysql_store_result(); // next we store the result inorder for it to be used further ahead.
            if(mysql_num_rows() > 0) // if the  database has more then one table with the given name
            {
                               // dialog for logging in
            }
Reply
#3

I use r38 plugin and cache
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)