

PHP WARNING:
	call_user_func_array() expects parameter 2 to be array, null given in xxxx\modules\prism_button.php on line 52
	1 :: call_user_func_array in xxxxmodules\prism_button.php:52
	2 :: click in xxxx\modules\prism_buttonmanager.php:152
	3 :: onButtonClick in xxxx\modules\prism_statehandler.php:123
	4 :: onButtonClick in xxxx\modules\prism_statehandler.php:61
	5 :: dispatchPacket in xxxx\modules\prism_hosts.php:576
	6 :: inspectPacket in xxxx\modules\prism_hosts.php:487
	7 :: handlePacket in xxxx\modules\prism_hosts.php:353
	8 :: checkTraffic in xxxx\PHPInSimMod.php:228
Loaded cvars.ini
Loaded hosts.ini
Loaded http.ini
Listening for http requests on 127.0.0.1:80
Loaded telnet.ini
Loaded admins.ini
Loaded plugins.ini
Loading plugins
Loading plugin: admin
Loading plugin: welcome
2 Plugins Loaded.
Connecting to 192.168.0.30:29999 ... #1
Connected to 192.168.0.30:29999
< IS_VER Packet from Cruise.
> TINY_ISM Packet to Cruise.
> TINY_SST Packet to Cruise.
> TINY_NCN Packet to Cruise.
> TINY_NPL Packet to Cruise.
> TINY_RES Packet to Cruise.
> TINY_GTH Packet to Cruise.
> TINY_SCP Packet to Cruise.
> TINY_REO Packet to Cruise.
> TINY_RST Packet to Cruise.
> TINY_AXI Packet to Cruise.
> TINY_NLP Packet to Cruise.
> TINY_MCI Packet to Cruise.
> TINY_RIP Packet to Cruise.
< IS_ISM Packet from Cruise.
> TINY_NCN Packet to Cruise.
> TINY_NPL Packet to Cruise.
> TINY_RES Packet to Cruise.
< IS_STA Packet from Cruise.
< IS_NCN Packet from Cruise.
< SMALL_RTP Packet from Cruise.
< IS_REO Packet from Cruise.
< IS_RST Packet from Cruise.
< IS_AXI Packet from Cruise.
< IS_RIP Packet from Cruise.
< IS_NCN Packet from Cruise.
< IS_MSO Packet from Cruise.
< IS_NCN Packet from Cruise.
< IS_STA Packet from Cruise.
< IS_MSO Packet from Cruise.
> IS_BTN Packet to Cruise.
array(2) {
  [0]=>
  object(ClientHandler)#14 (9) {
    ["players"]=>
    array(0) {
    }
    ["UCID":protected]=>
    int(0)
    ["UName":protected]=>
    string(0) ""
    ["PName":protected]=>
    string(4) "host"
    ["Admin":protected]=>
    int(1)
    ["Total":protected]=>
    int(1)
    ["Flags":protected]=>
    int(0)
    ["parent"]=>
    object(StateHandler)#12 (47) {
      ["handles":protected]=>
      array(25) {
        [1]=>
        string(11) "onInSimInit"
        [2]=>
        string(9) "onVersion"
        [3]=>
        string(6) "onTiny"
        [4]=>
        string(7) "onSmall"
        [5]=>
        string(13) "onStateChange"
        [9]=>
        string(22) "onCameraPosisionChange"
        [10]=>
        string(18) "onMultiPlayerStart"
        [17]=>
        string(11) "onRaceStart"
        [36]=>
        string(9) "onReorder"
        [37]=>
        string(15) "onNodeLapPlayer"
        [38]=>
        string(14) "onMultiCarInfo"
        [43]=>
        string(11) "onAutoXInfo"
        [48]=>
        string(19) "onReplayInformation"
        [18]=>
        string(14) "onClientPacket"
        [19]=>
        string(14) "onClientPacket"
        [20]=>
        string(14) "onClientPacket"
        [21]=>
        string(14) "onPlayerPacket"
        [22]=>
        string(14) "onPlayerPacket"
        [23]=>
        string(14) "onPlayerPacket"
        [34]=>
        string(14) "onPlayerPacket"
        [35]=>
        string(14) "onPlayerPacket"
        [31]=>
        array(2) {
          [0]=>
          string(14) "onClientPacket"
          [1]=>
          string(14) "onPlayerPacket"
        }
        [42]=>
        string(16) "onButtonFunction"
        [46]=>
        string(13) "onButtonClick"
        [47]=>
        string(12) "onButtonText"
      }
      ["clients"]=>
      *RECURSION*
      ["players"]=>
      array(0) {
      }
      ["Version":protected]=>
      NULL
      ["Product":protected]=>
      NULL
      ["InSimVer":protected]=>
      NULL
      ["ReplaySpeed":protected]=>
      float(1)
      ["State":protected]=>
      int(2560)
      ["InGameCam":protected]=>
      int(0)
      ["ViewPLID":protected]=>
      int(0)
      ["NumP":protected]=>
      int(0)
      ["NumConns":protected]=>
      int(2)
      ["NumFinished":protected]=>
      int(0)
      ["RaceInProg":protected]=>
      int(0)
      ["QualMins":protected]=>
      int(0)
      ["RaceLaps":protected]=>
      int(0)
      ["Track":protected]=>
      string(3) "BL1"
      ["Weather":protected]=>
      int(2)
      ["Wind":protected]=>
      int(0)
      ["Pos":protected]=>
      NULL
      ["Heading":protected]=>
      NULL
      ["Pitch":protected]=>
      NULL
      ["Roll":protected]=>
      NULL
      ["FOV":protected]=>
      NULL
      ["Time":protected]=>
      NULL
      ["Host"]=>
      int(1)
      ["HName"]=>
      string(12) "^2Test server"
      ["Flags"]=>
      int(544)
      ["NumNodes"]=>
      int(323)
      ["Finish"]=>
      int(301)
      ["Split1"]=>
      int(86)
      ["Split2"]=>
      int(213)
      ["Split3"]=>
      int(65535)
      ["Info":protected]=>
      NULL
      ["NumC":protected]=>
      NULL
      ["AXStart":protected]=>
      int(0)
      ["NumCP":protected]=>
      int(0)
      ["NumO":protected]=>
      int(0)
      ["LName":protected]=>
      string(0) ""
      ["Error":protected]=>
      int(2)
      ["MPR":protected]=>
      int(0)
      ["Paused":protected]=>
      int(0)
      ["Options":protected]=>
      int(0)
      ["CTime":protected]=>
      int(0)
      ["TTime":protected]=>
      int(0)
      ["RName":protected]=>
      string(0) ""
      ["PLID"]=>
      array(0) {
      }
    }
    ["PRISM"]=>
    bool(false)
  }
  [1]=>
  object(ClientHandler)#13 (9) {
    ["players"]=>
    array(0) {
    }
    ["UCID":protected]=>
    int(1)
    ["UName":protected]=>
    string(11) "TRUCKER LTU"
    ["PName":protected]=>
    string(9) "^1Trucker"
    ["Admin":protected]=>
    int(1)
    ["Total":protected]=>
    int(2)
    ["Flags":protected]=>
    int(4)
    ["parent"]=>
    object(StateHandler)#12 (47) {
      ["handles":protected]=>
      array(25) {
        [1]=>
        string(11) "onInSimInit"
        [2]=>
        string(9) "onVersion"
        [3]=>
        string(6) "onTiny"
        [4]=>
        string(7) "onSmall"
        [5]=>
        string(13) "onStateChange"
        [9]=>
        string(22) "onCameraPosisionChange"
        [10]=>
        string(18) "onMultiPlayerStart"
        [17]=>
        string(11) "onRaceStart"
        [36]=>
        string(9) "onReorder"
        [37]=>
        string(15) "onNodeLapPlayer"
        [38]=>
        string(14) "onMultiCarInfo"
        [43]=>
        string(11) "onAutoXInfo"
        [48]=>
        string(19) "onReplayInformation"
        [18]=>
        string(14) "onClientPacket"
        [19]=>
        string(14) "onClientPacket"
        [20]=>
        string(14) "onClientPacket"
        [21]=>
        string(14) "onPlayerPacket"
        [22]=>
        string(14) "onPlayerPacket"
        [23]=>
        string(14) "onPlayerPacket"
        [34]=>
        string(14) "onPlayerPacket"
        [35]=>
        string(14) "onPlayerPacket"
        [31]=>
        array(2) {
          [0]=>
          string(14) "onClientPacket"
          [1]=>
          string(14) "onPlayerPacket"
        }
        [42]=>
        string(16) "onButtonFunction"
        [46]=>
        string(13) "onButtonClick"
        [47]=>
        string(12) "onButtonText"
      }
      ["clients"]=>
      *RECURSION*
      ["players"]=>
      array(0) {
      }
      ["Version":protected]=>
      NULL
      ["Product":protected]=>
      NULL
      ["InSimVer":protected]=>
      NULL
      ["ReplaySpeed":protected]=>
      float(1)
      ["State":protected]=>
      int(2560)
      ["InGameCam":protected]=>
      int(0)
      ["ViewPLID":protected]=>
      int(0)
      ["NumP":protected]=>
      int(0)
      ["NumConns":protected]=>
      int(2)
      ["NumFinished":protected]=>
      int(0)
      ["RaceInProg":protected]=>
      int(0)
      ["QualMins":protected]=>
      int(0)
      ["RaceLaps":protected]=>
      int(0)
      ["Track":protected]=>
      string(3) "BL1"
      ["Weather":protected]=>
      int(2)
      ["Wind":protected]=>
      int(0)
      ["Pos":protected]=>
      NULL
      ["Heading":protected]=>
      NULL
      ["Pitch":protected]=>
      NULL
      ["Roll":protected]=>
      NULL
      ["FOV":protected]=>
      NULL
      ["Time":protected]=>
      NULL
      ["Host"]=>
      int(1)
      ["HName"]=>
      string(12) "^2Test server"
      ["Flags"]=>
      int(544)
      ["NumNodes"]=>
      int(323)
      ["Finish"]=>
      int(301)
      ["Split1"]=>
      int(86)
      ["Split2"]=>
      int(213)
      ["Split3"]=>
      int(65535)
      ["Info":protected]=>
      NULL
      ["NumC":protected]=>
      NULL
      ["AXStart":protected]=>
      int(0)
      ["NumCP":protected]=>
      int(0)
      ["NumO":protected]=>
      int(0)
      ["LName":protected]=>
      string(0) ""
      ["Error":protected]=>
      int(2)
      ["MPR":protected]=>
      int(0)
      ["Paused":protected]=>
      int(0)
      ["Options":protected]=>
      int(0)
      ["CTime":protected]=>
      int(0)
      ["TTime":protected]=>
      int(0)
      ["RName":protected]=>
      string(0) ""
      ["PLID"]=>
      array(0) {
      }
    }
    ["PRISM"]=>
    array(3) {
      ["accessFlags"]=>
      int(2528454)
      ["connection"]=>
      string(6) "Cruise"
      ["temporary"]=>
      bool(true)
    }
  }
}
class welcome extends Plugins
{
	const URL = 'http://lfsforum.net/forumdisplay.php?f=312';
	const NAME = 'Welcome & MOTD';
	const AUTHOR = 'PRISM Dev Team';
	const VERSION = PHPInSimMod::VERSION;
	const DESCRIPTION = 'Welcome messages for clients, and Message of the Day (MOTD)';
	public function __construct()
	{
		$this->registerPacket('onPrismConnect', ISP_VER);
		$this->registerPacket('onClientConnect', ISP_NCN);
		$this->registerSayCommand('komanda', 'cmdTestas', 'Information about the triggers purpose goes here.');
	}
	public function onPrismConnect(IS_VER $VER)
	{
		IS_MSX()->Msg('PRISM Version ^3'.PHPInSimMod::VERSION.'^8 Has Connected.')->Send();
	}
	public function onClientConnect(IS_NCN $NCN)
	{
		$MTC = IS_MTC()->Sound(SND_SYSMESSAGE)->UCID($NCN->UCID);
		$MTC->Text('^1Hello :)')->Send();
	}
	public function cmdTestas($cmd, $ucid)
	{
		global $PRISM;
		$btn_close = new Button($ucid, 'testbtn', 'test'); 
        $btn_close->Text('Click me'); 
        $btn_close->L(120)->T(40)->W(20)->H(20)->BStyle = ISB_CLICK; 
        $btn_close->registerOnClick($this, 'click'); 
        $btn_close->send();
		
		return PLUGIN_HANDLED;
	}
	public function click() 
    { 
        IS_MSX()->Msg('Clicked a button!')->Send(); 
    }
}insim.Send(new IS_BTN { Text = "Your text", BStyle = ButtonStyles.ISB_CLICK | ButtonStyles.ISB_LIGHT, UCID = C.UCID, H = 6, W = 30, T = 30, L = 80, ClickID = 6, ReqI = 6, Caption = "Text when pressed", TypeIn = 10}); So I found older one, why 3 posts? Because I rarely come to this forum, and earlier I haven't got any questions. Now just learning C# InSim programming.
 So I found older one, why 3 posts? Because I rarely come to this forum, and earlier I haven't got any questions. Now just learning C# InSim programming. I will buy S2 when I have enough cash to it
 I will buy S2 when I have enough cash to it