megablox Posted July 17, 2012 Posted July 17, 2012 What I mean is can you somehow read a players IP by having him/her interact with an NPC? Quote
Euphy Posted July 17, 2012 Posted July 17, 2012 query_sql("SELECT `last_ip` FROM `login` WHERE `account_id` = "+getcharid(3)+";",.@IP$); dispbottom .@IP$; Quote
herenow Posted July 18, 2012 Posted July 18, 2012 query_sql("SELECT `last_ip` FROM `login` WHERE `account_id` = "+getcharid(3)+" LIMIT 1;",.@IP$); dispbottom .@IP$; '-' Quote
Mystery Posted July 18, 2012 Posted July 18, 2012 (edited) query_sql("SELECT `last_ip` FROM `login` WHERE `account_id` = "+getcharid(3)+" LIMIT 1;",.@IP$); dispbottom .@IP$; '-' ?.. You just easily add that to an existing script or make an entire new script revolving around that little code blurb o_O Edited July 18, 2012 by Mysterious Quote
herenow Posted July 18, 2012 Posted July 18, 2012 I supose that by account_id being primary key, mysql adds a limit 1 by default '-'. But querys that only expects 1 result and dont have a limit 1, gives me a itch lol. Quote
Euphy Posted July 18, 2012 Posted July 18, 2012 All results from SQL queries are stored in a variable array, starting at the 0th element (as you would expect). There's nothing fancy about it. O: Quote
Mystery Posted July 18, 2012 Posted July 18, 2012 You can increase the Limit by changing 1 to whatever. But really, with that snippet, you're just getting THAT character's IP.. and knowing 1 char, he has only 1 IP attached to it, not multiple Quote
Question
megablox
What I mean is can you somehow read a players IP by having him/her interact with an NPC?
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.