Cadu12 Posted September 30, 2011 Posted September 30, 2011 I made trace with php using Maxmind include("mta_sdk.php"); $input = mta::getInput(); $getPlayerTraceInfo = getPlayerTrace($input); // I made the functions, so i cant post full php. mta::doReturn( $getPlayerTraceInfo ); returns [{"ip":"24.24.24.24","country":"United States","city":"Binghamton"}] function result(sum) --outputChatBox(sum["ip"]) outputServerLog(sum["ip"]) end function InfoCityPlayer(ip) callRemote("http://localhost/trace.php", result, ip) end InfoCityPlayer("24.24.24.24") returns nil Ingame nick: Cadu12
Aibo Posted September 30, 2011 Posted September 30, 2011 from my experience with MTA callRemote, it doesnt like JSON objects like {"Name1":"Value1", "Name2":"Value2"} (they were always nil/empty), only indexed arrays ["Value1", "Value2"] worked fine for me. ?
Cadu12 Posted September 30, 2011 Author Posted September 30, 2011 mta::doReturn( $getPlayerTraceInfo["ip"], $getPlayerTraceInfo["contry"] ); outputServerLog(sum[2]) ? Ingame nick: Cadu12
Aibo Posted September 30, 2011 Posted September 30, 2011 if you do it that way, callback function should be: function result(ip, country) outputServerLog("IP: "..ip..", country: "..country) end ?
Cadu12 Posted September 30, 2011 Author Posted September 30, 2011 Fixed, it was php. so thank you for help. =] Ingame nick: Cadu12
eAi Posted September 30, 2011 Posted September 30, 2011 To clarify, doReturn expects an array as it is this array that becomes the arguments to the callback function of callRemote. Passing a dictionary/table makes no sense. Of course, the PHP code should tell you this. If someone wants to fix that and upload a new version, feel free.
Cadu12 Posted October 2, 2011 Author Posted October 2, 2011 I have made a google translate and works fine. http://i52.tinypic.com/w0i3ra.png I will give you both credis. Ingame nick: Cadu12
Castillo Posted October 2, 2011 Posted October 2, 2011 Well, seems like my "Google translator" idea got already copied, but that doesn't make the idea legitim . San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Cadu12 Posted October 2, 2011 Author Posted October 2, 2011 Im not copying your GUI Edit: Oh i forget for credis you for link or not? Ingame nick: Cadu12
Castillo Posted October 2, 2011 Posted October 2, 2011 I wasn't talking about the GUI design, I was talking about the idea itself. P.S: I didn't gave you any link, that was sarcasm I guess . San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Cadu12 Posted October 2, 2011 Author Posted October 2, 2011 But you help me a bit for google api, do you remember? Ingame nick: Cadu12
Castillo Posted October 2, 2011 Posted October 2, 2011 Well, I just told you to search for google api. P.S: Let's stop doing off-topic . San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Cadu12 Posted October 5, 2011 Author Posted October 5, 2011 Sorry the again offtopic. @Solidsnake14 thats why i dont have any ideas, becuase i am deaf. I have problem with deaf =( So i can copy ideas Ingame nick: Cadu12
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now