Menu

#13 Protocol change for SA-MP

open-fixed
nobody
None
5
2010-03-17
2010-03-16
No

Well, this isn't really a protocol change, it's just that people who have been writing scripts for SA-MP haven't really bothered to explore the possibilities before the 0.3 release. If you want a detailed explanation of the protocol, it's at http://wiki.sa-mp.com/wiki/Query_Mechanism (written by me, obv), and I've included my own query include, if you need a PHP version. I tried to edit the GameQ's /Protocol/samp.php file, but failed dramatically - when I get a working copy, I'll link to that as well.

:)

Discussion

  • David Weston

    David Weston - 2010-03-16

    SA-MP Query API

     
  • David Weston

    David Weston - 2010-03-16

    Oh, and I forgot to tell you why it might be classed as a bug. Player counts are restricted to 0 < x < 255, then they will overrun with GameQ. Also for your information, if the player count is more than 100, then no player information will be returned. Just for your info.

     
  • Evilpie

    Evilpie - 2010-03-17

    Hey typefish,
    thank you for this wonderfull research. I was able to fix those bugs, but its still impossible to query servers with more then 100 players, because there seems to be a problem with the servers. Even with code wich never timeouts, i cant query those.
    But i changed the player query, so we now can see more informations like id or ping.

    btw:
    OpCode c -> This really doesn't stand for anything
    Did you think of "Clients".

     
  • Evilpie

    Evilpie - 2010-03-17
    • status: open --> pending-fixed
     
  • David Weston

    David Weston - 2010-03-17
    • status: pending-fixed --> open-fixed
     
  • David Weston

    David Weston - 2010-03-17

    I suppose about the 100 player feature I was being ambiguous. It's the protocol that causes that, due to a feature that is there to stop self-DoS attacks originating from the server - or it's a cheap way of avoiding rewriting the protocol because there's a bug with the `d` opcode which means the player ID will never rise above 255 - we'll never know. :p And about `c` - evilpie, thanks for that. I didn't really think of that name, I'll edit it now.

    -Westie

     
  • David Weston

    David Weston - 2010-03-17

    I've had a test now, and it seems that the names is a bit bugged. I got this when I was trying to edit the library, but works perfect using my own.

    print_r(): http://westie.pastebin.com/YiLBZE1F

    I'll try and help you find the problem.

     
  • Evilpie

    Evilpie - 2010-03-17

    Mhm: http://westie.pastebin.com/nEBp3RC8

    I think you forgot to update packets.ini

     
  • David Weston

    David Weston - 2010-03-17

    Correct you are. Thank you! :)

     
  • Evilpie

    Evilpie - 2010-03-17

    No problem

     

Log in to post a comment.