View Full Version : [HELP] mysql offline chech player

18/03/2014, 06:58 PM
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:

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

18/03/2014, 07:06 PM
We probably don't use the same MySQL plugin, but try taking a look at this:
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

18/03/2014, 07:12 PM
I use r38 plugin and cache