How to send MUS commands to Plus Emu from UberCMS

Results 1 to 2 of 2
  1. #1
    Gamma Spamma Liam is offline
    MemberRank
    Dec 2011 Join Date
    Down UnderLocation
    2,946Posts

    How to send MUS commands to Plus Emu from UberCMS

    Hey fellas, so I'm using Plus Emu, and UberCMS.. I'm using the MUS system that was coded with UberCMS, but the MUS commands don't seem to be working. For example:
    PHP Code:
    $core->Mus('disconnect''Liam'); 
    The original code in UberCMS:
    Spoiler:
    public function Mus($header, $data = '') {
    if ($this->config['MUS']['enabled'] == false || $this->getSystemStatus() == "0")
    {
    return;
    }

    $musData = $header . chr(1) . $data;

    $sock = @socket_create(AF_INET, SOCK_STREAM, getprotobyname('tcp'));
    @socket_connect($sock, $this->config['MUS']['ip'], intval($this->config['MUS']['port']));
    @socket_send($sock, $musData, strlen($musData), MSG_DONTROUTE);
    @socket_close($sock);
    }


    Now it's actually been years since I've ever used MUS, probably back in the day of Slaxxor's Uber edit, etc.. So I don't have a very strong understanding, I know I've setup the ports correct, and I've even allowed the ports through on my local firewall.. But to no avail. I've played around with different commands, and just can't seem to get MUS commands to send to the emulator. Some enlightenment would be appreciated. @Sledmore

    Cheers,

    - - - Updated - - -

    Solved, I'm actually so tired.. Didn't realise:
    || $this->getSystemStatus() == "0"
    Close thread. Cheers.


  2. #2
    Valued Member MedinaJoshua is offline
    MemberRank
    Oct 2009 Join Date
    inetpub/wwwrootLocation
    114Posts

    Re: How to send MUS commands to Plus Emu from UberCMS

    Quote Originally Posted by Liam View Post
    Hey fellas, so I'm using Plus Emu, and UberCMS.. I'm using the MUS system that was coded with UberCMS, but the MUS commands don't seem to be working. For example:
    PHP Code:
    $core->Mus('disconnect''Liam'); 
    The original code in UberCMS:
    Spoiler:
    public function Mus($header, $data = '') {
    if ($this->config['MUS']['enabled'] == false || $this->getSystemStatus() == "0")
    {
    return;
    }

    $musData = $header . chr(1) . $data;

    $sock = @socket_create(AF_INET, SOCK_STREAM, getprotobyname('tcp'));
    @socket_connect($sock, $this->config['MUS']['ip'], intval($this->config['MUS']['port']));
    @socket_send($sock, $musData, strlen($musData), MSG_DONTROUTE);
    @socket_close($sock);
    }


    Now it's actually been years since I've ever used MUS, probably back in the day of Slaxxor's Uber edit, etc.. So I don't have a very strong understanding, I know I've setup the ports correct, and I've even allowed the ports through on my local firewall.. But to no avail. I've played around with different commands, and just can't seem to get MUS commands to send to the emulator. Some enlightenment would be appreciated. @Sledmore

    Cheers,

    - - - Updated - - -

    Solved, I'm actually so tired.. Didn't realise:

    Close thread. Cheers.
    Bro can you tell me how you fix this step by step or maybe you can send me your eha and this fixed code :

    Code:
    public function Mus($header, $data = '')	{
    if ($this->config['MUS']['enabled'] == false || $this->getSystemStatus() == "0")
    {
    return;
    }
    
    $musData = $header . chr(1) . $data;
    
    $sock = @socket_create(AF_INET, SOCK_STREAM, getprotobyname('tcp')); @socket_connect($sock, $this->config['MUS']['ip'], intval($this->config['MUS']['port'])); @socket_send($sock, $musData, strlen($musData), MSG_DONTROUTE);	 @socket_close($sock);
    }



Advertisement