Senduser MUS command!

Results 1 to 7 of 7
  1. #1
    Account Upgraded | Title Enabled! iRetro™ is offline
    MemberRank
    Feb 2010 Join Date
    United KingdomLocation
    558Posts

    Senduser MUS command!

    Hey, why isn't the senduser command working on Phoenix 3.11.0, all the other mus commands work fine apart from this one.

    This is my code.
    Code:
     $core->Mus('senduser', '1', '1');
    This is my Mus function
    Code:
    public function Mus($header, $data = '', $data2 = '')
    	{
    		if ($this->config['MUS']['enabled'] == "false" || $this->getSystemStatus() == "0")
    		{
    			return;
    		}
    		
    		$musData = $header . chr(1) . $data;
    		
    		if ($data2 != '')
            {
            $musData = $header . chr(1) . $data . chr(1) . $data2; 
            }
    		
    		$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);
    	}
    Thanks, in advance.

    - - - Updated - - -
    @FullmetalPride knows, I believe help me pal.


  2. #2
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,608Posts

    Re: Senduser MUS command!

    Where do you execute this code from? Like when people press a button on your CMS?

  3. #3
    Account Upgraded | Title Enabled! iRetro™ is offline
    MemberRank
    Feb 2010 Join Date
    United KingdomLocation
    558Posts

    Re: Senduser MUS command!

    Just via visiting a page, etc http://hotellink.com/room/1.

  4. #4
    Ask me about Daoism FullmetalPride is offline
    MemberRank
    Nov 2010 Join Date
    2,172Posts

    Re: Senduser MUS command!

    So all of the other commands work using this code except for senduser?


    If they do, then either you're not using the right parameters, or you're using the command wrong.

    I think I get what you're doing. You're trying to send a user to a room when they're already online the hotel. This should work.

    My only guess is, remove the $data2 parameter and just use

    PHP Code:
    mus("senduser""1 1"); 

  5. #5
    Account Upgraded | Title Enabled! iRetro™ is offline
    MemberRank
    Feb 2010 Join Date
    United KingdomLocation
    558Posts

    Re: Senduser MUS command!

    Quote Originally Posted by FullmetalPride View Post
    So all of the other commands work using this code except for senduser?


    If they do, then either you're not using the right parameters, or you're using the command wrong.

    I think I get what you're doing. You're trying to send a user to a room when they're already online the hotel. This should work.

    My only guess is, remove the $data2 parameter and just use

    PHP Code:
    mus("senduser""1 1"); 
    Turns out, they don't get sent to the room if the room isn't loaded, meaning the room has to be loaded (users in the room), I've fixed this problem in the emulator.

  6. #6
    Member SuklaaVene is offline
    MemberRank
    Jul 2014 Join Date
    85Posts

    Re: Senduser MUS command!

    Quote Originally Posted by iRetro™ View Post
    Turns out, they don't get sent to the room if the room isn't loaded, meaning the room has to be loaded (users in the room), I've fixed this problem in the emulator.
    I fixed it >:/

  7. #7
    Account Upgraded | Title Enabled! iRetro™ is offline
    MemberRank
    Feb 2010 Join Date
    United KingdomLocation
    558Posts

    Re: Senduser MUS command!

    Quote Originally Posted by SuklaaVene View Post
    I fixed it >:/
    Indeed my young friend.



Advertisement