X ID Posted February 6, 2009 Report Share Posted February 6, 2009 Es jau iepriekš devu precīzu linku: http://developer.valvesoftware.com/wiki/Se...ries#A2S_PLAYER 0x44 ir atbilde - tas viss tur ir takstīts. Link to comment Share on other sites More sharing options...
bambam Posted February 7, 2009 Report Share Posted February 7, 2009 (edited) kā būtu ar spēlētāja team parādīšanu? skatos, ka serveris(source dzinis) tādu fiču neatgriež vispār jāmēģina kkā ar rcon konektēt un tad lasīt eventus, savādāk nav saprašanas kā to izdarīt... Edited February 7, 2009 by bambam Link to comment Share on other sites More sharing options...
worm Posted February 7, 2009 Report Share Posted February 7, 2009 teamu caur statusa komandām nevar dabūt... vai nu caur rcon vai arī caur kaut kādu sourcemod pluginu var vienkārši ik pa 30 sekundēm datubāzē rakstīt iekšā playeru listu (starpcitu, tā arī gigna CS saraksts strādā galvenajā lapā) Link to comment Share on other sites More sharing options...
bambam Posted February 7, 2009 Report Share Posted February 7, 2009 sourcemod tā dēļ likt negribās, toties ir hlstatsx, kurš to rāda, no viņa arī izravēšu koda gabalu Link to comment Share on other sites More sharing options...
worm Posted February 10, 2009 Report Share Posted February 10, 2009 a kas vainas sourcemodam? ja rokas nav līkas, tur var reālus brīnumus taisīt Link to comment Share on other sites More sharing options...
bambam Posted February 10, 2009 Report Share Posted February 10, 2009 (edited) kopš 2005. gada stāv mani-admin, pārāk daudz jāmaina, jāpielāgo, nav apņēmības... Edited February 10, 2009 by bambam Link to comment Share on other sites More sharing options...
ANALGINS Posted February 11, 2009 Report Share Posted February 11, 2009 lasi dokumentaciju, un paraleli uztaisi sourcemodu.. pectam parliec.. tas arii vis, kas tur sarezgits ? Link to comment Share on other sites More sharing options...
bambam Posted February 11, 2009 Report Share Posted February 11, 2009 (edited) neteicu sarežģīts, nav apņēmības, pārāk daudz kas jāpielāgo, jāmeklē sm plugini, utt, pagaidaam esošā sistēma apmierina, spēlētājus ar... Edited February 11, 2009 by bambam Link to comment Share on other sites More sharing options...
worm Posted February 11, 2009 Report Share Posted February 11, 2009 nu itkā jau sourcemodam defaultie plugini ir apmierinoši, ja vien nevajag kaut ko perversu, bet nu katram jau labāk spriest pēc savām vajadzībām... var jau arī pats savu moduli uzrakstīt, valvei jau tagad laba dokumentācija pieejama ir caur sourcesdk Link to comment Share on other sites More sharing options...
_Yu-Gi-Oh__ Posted February 12, 2009 Report Share Posted February 12, 2009 Hm. Kā būtu iespējams izvadīt rezultātu? (Nevis katra spēlētāja, bet komandas kopumā (CT, Ts)) Un vai to maz ir iespējams izdarīt neko nedarot ar serveri (Šajā gadījumā cs) (Runa iet par amxx modiem).? Link to comment Share on other sites More sharing options...
X ID Posted February 12, 2009 Report Share Posted February 12, 2009 Ar Server Query tas nav iespējams, jo netiek atgriezta spēlētāja komanda vai komandas rezultāts. Link to comment Share on other sites More sharing options...
GOMA smile Posted February 15, 2009 Report Share Posted February 15, 2009 Man ir jatuājums šajā sakarā ir iespējams izvilkt bez pluginiem,mysql ...... Fragus,bet vai ir iespējams izvilkt dedus ? Link to comment Share on other sites More sharing options...
X ID Posted February 16, 2009 Report Share Posted February 16, 2009 Cik reizes šajā topikā ir parādijies links uz manuāli? Daudz. Server Query var atgriezt tikai spēlētāja vārdu, fragus un laiku. Ja tavam php skriptam ir pieeja servera shell'am, tad vari ekzecot kaut kādu amx_list (vai nu kas jums tur par komandām, kas uzrāda spēlētājus, fragus, nāves, utt) un apstrādāt saņemtos datus. Link to comment Share on other sites More sharing options...
*jancis38* Posted February 17, 2009 Author Report Share Posted February 17, 2009 Ja serveris ir izslēgts, tad lapu arī ilgi lādē, varētu būt kāds risinājums tam? Link to comment Share on other sites More sharing options...
bambam Posted February 17, 2009 Report Share Posted February 17, 2009 lieto cache tam monitoram, lai pie katras ielādes nebūtu japievienojas serverim, vai arī fsockopen uzliec mazāku timeout laiku Link to comment Share on other sites More sharing options...
*jancis38* Posted February 17, 2009 Author Report Share Posted February 17, 2009 (edited) Cik mazam timeout'am jābūt? EDIT: Uzliku uz 1, bet vienalga neliek mieru, ar šo. Un jebkurā gadījumā ilgi lādē. Edited February 17, 2009 by *jancis38* Link to comment Share on other sites More sharing options...
X ID Posted February 18, 2009 Report Share Posted February 18, 2009 Divas iespējas: 1) Kešo datus, tb ik pa 1min (vai kāds cits laika intervāls) pieprasi datus par serveri un saglabā tos datubāzē. Atjaunošanu veic crontab's (*nix) vai Scheduled Tasks (win). Klientam parādi tos datus, kas šobrīd ir datubāzē. Patiesībā šis variants būtu labāks par otru. 2) Ielādē datus ar Ajax. Klientam atvērs lapu un tikai pēc tam tu slēgsies pie servera. Link to comment Share on other sites More sharing options...
*jancis38* Posted February 18, 2009 Author Report Share Posted February 18, 2009 (edited) Kāds varētu lūdzu sīkāk izskaidrot, kā izdabūt to spēlētāju sarakstu? EDIT: Beidzot ierubījos, tik kādam ir jābūt request'am, lai atbildē iegūtu 0x44? Edited February 18, 2009 by *jancis38* Link to comment Share on other sites More sharing options...
worm Posted February 19, 2009 Report Share Posted February 19, 2009 Lai dabūtu playeru sarakstu, tev no sākuma ir jādabū challenge numbers... tas varētu stipri aptuveni izskatīties šādi: PHP <? define ('A2S_PLAYER', "\x55"); $response = query(A2S_PLAYER . "\xFF\xFF\xFF\xFF"); if ( getbyte($response) != 0x41 ) die( 'nedabujaam challenge'); $challenge = @pack("L", getlong($response)); $response = query(A2S_PLAYER . $challenge); if ( getbyte($response) != 0x44 ) die( 'nedabujaam playeru sarakstu'); // talak viss naak no dokumentacijas... $total_players = getbyte($response); for( $i = 0;$i < $total_players; $i++) { // ... } ?> Link to comment Share on other sites More sharing options...
*jancis38* Posted February 19, 2009 Author Report Share Posted February 19, 2009 (edited) PHP <? define ('A2S_PLAYER', "x55"); $response = query(A2S_PLAYER . "xFFxFFxFFxFF"); if ( getbyte($response) != 0x41 ) die( 'nedabujaam challenge'); $challenge = @pack("L", getlong($response)); $response = query(A2S_PLAYER . $challenge); if ( getbyte($response) != 0x44 ) die( 'nedabujaam playeru sarakstu'); $total_players = getbyte($response); getbyte($response); $name = getstring($response); $kills = getlong($response); for( $i = 0;$i < $total_players; $i++) { echo "$name / $kills<br />n"; } ?> Izvada nika pāris pēdējos burtus, un kills 0, dažreiz kaut kāds liels skaitlis. Es kaut ko nepareizi daru? EDIT: Ā, un izvada tikai vienu niku. Edited February 19, 2009 by *jancis38* Link to comment Share on other sites More sharing options...
X ID Posted February 19, 2009 Report Share Posted February 19, 2009 Nepareizi gan, jo spēlētāji tiek mesti "klucī". Tev ciklā jāapstrādā dati. Link to comment Share on other sites More sharing options...
*jancis38* Posted February 19, 2009 Author Report Share Posted February 19, 2009 Tu domā šādi: PHP <?php $total_players = getbyte($response); for( $i = 0;$i < $total_players; $i++) { $name = getstring($response); $kills = getlong($response); echo "$name / $kills<br />\n"; } ?> Šis variants arī nestrādā. Fragu skaits palicis, daudzas reizes lielāks (1936289024 un pat vairāk, lol), un no visiem nikiem precīzi parādīja tikai vienu (sp[A]nky[Z]). Link to comment Share on other sites More sharing options...
bambam Posted February 19, 2009 Report Share Posted February 19, 2009 (edited) tad jau kkā tā: PHP <?php $name = getstring($response); $kills = getlong($response); for( $i = 0;$i < $total_players; $i++) { echo $name[i]." / ".$kills[i]."<br />\n"; } ?> Edited February 19, 2009 by bambam Link to comment Share on other sites More sharing options...
worm Posted February 19, 2009 Report Share Posted February 19, 2009 es nesaprotu, jūs visi dokumentāciju kādreiz lasat arī? Then for each player the following fields are sent: Index - byte The index into [0.. Num Players] for this entry Player Name - string Player's name Kills - long Number of kills this player has Time connected - float The time in seconds this player has been connected tieši KURĀ vietā ir rakstīs ka formāts ir 1) name 2) kills ?? no responses ir jālasa PRECĪZI tādā formātā, kāds ir norādīts aprakstā. Un nevar izlaist kādu no getfloat vai getlong... ir jālieto VISI, kas ir prasīti! nu lūūūūūūdzu pirms savām debīlajām idejām, palasat tomēr doooookuuuuumeeeeeentaaaaaaaaaciiiiiiijuuuuu... PĀĀĀĀLLLDIEEEEEESSS Link to comment Share on other sites More sharing options...
conrad Posted February 25, 2009 Report Share Posted February 25, 2009 (edited) Kas varētu būt par iemeslu, ka uz hostinga neiet neviens servera querijs? Hostējos zem nano.lv . Saprotu, ka kaut kas nogriezts, bet ko lai es prasu adminam? "Ēū, man te CS kverijs neiet, lūdzu sataisi!" P.S. Errorus nekādus nerāda. Parādās tikai balta lapa. Tas pats skripts uz localhost darbojas. Edited February 25, 2009 by conrad Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now