[Pawn] I need some help with my /whois command. - Printable Version + open.mp forum (https://forum.open.mp) -- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3) --- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10) --- Thread: [Pawn] I need some help with my /whois command. (/showthread.php?tid=334) |
I need some help with my /whois command. - Stefhan - 2019-04-17 So I am trying to create a /whois command that does the following: You type '/whois character Sean_Johnson' for example. As a result, you get this string/msgbox: SQLID: 10 Account: Stefhan Characters: Sean_Johnson, Carl_Johnson, Kendl_Johnson CHRIDS: 40, 41, 49 Level: 10, 5, 8 However, the info required is in two seperate tables (accounts & characters), which is where I get stuck. I simply don't know how to proceed. Can anyone guide me further? What is an?efficient way to do this??Am I even doing it right? I appreciate the assistance. PHP Code: CMD:whois(playerid, params[]) RE: I need some help with my /whois command. - mr_sacrimoni - 2019-04-17 "SELECT c.SQLID, c.CHRID, c.CharName, c.Level, a.Username FROM characters c LEFT JOIN accounts a ON c.SQLID = a.SQLID WHERE c.SQLID = %d" RE: I need some help with my /whois command. - Stefhan - 2019-04-17 (2019-04-17, 07:33 PM)mr_sacrimoni Wrote: "SELECT c.SQLID, c.CHRID, c.CharName, c.Level, a.Username FROM characters c LEFT JOIN accounts a ON c.SQLID = a.SQLID Thanks a lot, I managed to get it working now! |