gledy Posted October 26, 2010 Share Posted October 26, 2010 hi, i find php query for Multi Theft Auto... Please Query and a demonstration application, thanks Link to comment
dzek (varez) Posted October 26, 2010 Share Posted October 26, 2010 https://wiki.multitheftauto.com/wiki/PHP_SDK Link to comment
gledy Posted October 27, 2010 Author Share Posted October 27, 2010 ok thanks and you can show me a simple example? with query not very good Link to comment
dzek (varez) Posted October 27, 2010 Share Posted October 27, 2010 there IS an example there.. Link to comment
gledy Posted October 30, 2010 Author Share Posted October 30, 2010 and please.. how to make Online/Offline Status ? Link to comment
dzek (varez) Posted October 30, 2010 Share Posted October 30, 2010 viewtopic.php?f=91&t=29793 Link to comment
gledy Posted October 30, 2010 Author Share Posted October 30, 2010 hmm, server is offline and script write "Connected" Link to comment
dzek (varez) Posted October 30, 2010 Share Posted October 30, 2010 check my reply in this post, ignore 1st post. Link to comment
gledy Posted October 30, 2010 Author Share Posted October 30, 2010 and Query for PHP5 ? Link to comment
dzek (varez) Posted October 30, 2010 Share Posted October 30, 2010 omg just go into that site i posted in the topic mentioned above! Link to comment
gledy Posted October 30, 2010 Author Share 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; Link to comment
dzek (varez) Posted October 31, 2010 Share Posted October 31, 2010 DUDE! Are you blind, or what? I told you ........... argh, whatever USE THIS, NOTHING ELSE! http://callofdutystats.net/ Link to comment
gledy Posted October 31, 2010 Author Share Posted October 31, 2010 I do not want GameQ ... and there I can not pull the query Link to comment
dzek (varez) Posted October 31, 2010 Share Posted October 31, 2010 what? you can do everything with this, its updated, proper-written and just working fine.. Link to comment
gledy Posted October 31, 2010 Author Share Posted October 31, 2010 sorry .. I need only query that pulls through the protocol name, players, map and online / offline status Link to comment
dzek (varez) Posted October 31, 2010 Share Posted October 31, 2010 its..actually..doing..this.. so what is the problem? Link to comment
gledy Posted November 1, 2010 Author Share 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 Link to comment
dzek (varez) Posted November 1, 2010 Share Posted November 1, 2010 example included in zip with this script. Link to comment
gledy Posted November 1, 2010 Author Share Posted November 1, 2010 and I really have to enter FTP information? Link to comment
dzek (varez) Posted November 1, 2010 Share Posted November 1, 2010 no? read instructions if you don't know how to use it. Link to comment
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