gledy Posted October 26, 2010 Posted October 26, 2010 hi, i find php query for Multi Theft Auto... Please Query and a demonstration application, thanks
dzek (varez) Posted October 26, 2010 Posted October 26, 2010 https://wiki.multitheftauto.com/wiki/PHP_SDK
gledy Posted October 27, 2010 Author Posted October 27, 2010 ok thanks and you can show me a simple example? with query not very good
gledy Posted October 30, 2010 Author Posted October 30, 2010 and please.. how to make Online/Offline Status ?
gledy Posted October 30, 2010 Author Posted October 30, 2010 hmm, server is offline and script write "Connected"
dzek (varez) Posted October 30, 2010 Posted October 30, 2010 check my reply in this post, ignore 1st post.
dzek (varez) Posted October 30, 2010 Posted October 30, 2010 omg just go into that site i posted in the topic mentioned above!
gledy Posted October 30, 2010 Author Posted October 30, 2010 <? function mta_getServer_process($dat) { if (substr($dat,0,4)=="EYE1") { $dat=substr($dat,4); $i=0; while($dat!="") { if (substr($dat,0,2)==chr(1)."?") { $dat=substr($dat,2); } $l=ord(substr($dat,0,1)); $blks[$i]=substr($dat,1,$l-1); $dat=substr($dat,$l); $i++; } $ret->gameshort=$blks[0]; $ret->port=$blks[1]; $ret->name=$blks[2]; $ret->rules['game']=$blks[3]; $ret->map=$blks[4]; $ret->rules['version']=$blks[5]; if ($blks[6]=="0") { $ret->public=1; } else { $ret->public=0; } $ret->players=$blks[7]; $ret->maxplayers=$blks[8]; $j=0; for ($i=11; $i<sizeof($blks)-2; $i=$i+5) { $ret->player[$j]->name=$blks[$i]; $ret->player[$j]->score=$blks[$i+3]; $ret->player[$j]->time=0; $j++; } } return $ret; } function mta_getServer_send($fp) { fwrite($fp,"s"); } function mta_getServer($ip,$port) { $fp=fsockopen("udp://$ip", $port, $errno, $errstr); if (!$fp) { } else { stream_set_timeout($fp,1,0); mta_getServer_send($fp); $data=fread($fp,16384); fclose($fp); return mta_getServer_process($data); } } ?> not working for server 80.79.23.150:22003 PHP File: $info=mta_getServer('80.79.23.150', '22003'); echo $info->name;
dzek (varez) Posted October 31, 2010 Posted October 31, 2010 DUDE! Are you blind, or what? I told you ........... argh, whatever USE THIS, NOTHING ELSE! http://callofdutystats.net/
gledy Posted October 31, 2010 Author Posted October 31, 2010 I do not want GameQ ... and there I can not pull the query
dzek (varez) Posted October 31, 2010 Posted October 31, 2010 what? you can do everything with this, its updated, proper-written and just working fine..
gledy Posted October 31, 2010 Author Posted October 31, 2010 sorry .. I need only query that pulls through the protocol name, players, map and online / offline status
dzek (varez) Posted October 31, 2010 Posted October 31, 2010 its..actually..doing..this.. so what is the problem?
gledy Posted November 1, 2010 Author Posted November 1, 2010 sorry .. few understand it, I'm a noob ... would be a good concrete example .. Forum on game-monitor is a nice example, but then does not work for my version
dzek (varez) Posted November 1, 2010 Posted November 1, 2010 example included in zip with this script.
gledy Posted November 1, 2010 Author Posted November 1, 2010 and I really have to enter FTP information?
dzek (varez) Posted November 1, 2010 Posted November 1, 2010 no? read instructions if you don't know how to use it.
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