Ejemplo n.º 1
0
 public void invokeOnPlayerExitVehicle(ServerPlayer player, ServerVehicle vehicle)
 {
     if (onPlayerExitVehicle != null)
     {
         onPlayerExitVehicle.Invoke(player, vehicle);
     }
 }
Ejemplo n.º 2
0
        public void EnterVehicle(ServerVehicle vehicle)
        {
            currentVehicleId = vehicle.id;
            var bpf = new BinaryPacketFormatter(Commands.NPC_walkTo);

            bpf.Add(id);
            bpf.Add(vehicle.id);
            broadcastEvent(bpf);
        }
 public ServerVehicle create(string model, Vector3 position, Quaternion orientation)
 {
     uint vid = findLowestFreeId();
     ServerVehicle veh = new ServerVehicle(vid);
     veh.position = position;
     veh.orientation = orientation;
     veh.model = model;
     vehicles.Add(vid, veh);
     Server.instance.InvokeParallelForEachPlayer((player) =>
     {
         var bpf = new BinaryPacketFormatter(Commands.Vehicle_create);
         bpf.Add(veh.id);
         bpf.Add(veh.position);
         bpf.Add(veh.orientation);
         bpf.Add(ModelDictionary.getVehicleByName(veh.model));
         player.connection.write(bpf.getBytes());
     });
     return veh;
 }
Ejemplo n.º 4
0
        public ServerVehicle create(string model, Vector3 position, Quaternion orientation)
        {
            uint          vid = findLowestFreeId();
            ServerVehicle veh = new ServerVehicle(vid);

            veh.position    = position;
            veh.orientation = orientation;
            veh.model       = model;
            vehicles.Add(vid, veh);
            Server.instance.InvokeParallelForEachPlayer((player) =>
            {
                var bpf = new BinaryPacketFormatter(Commands.Vehicle_create);
                bpf.Add(veh.id);
                bpf.Add(veh.position);
                bpf.Add(veh.orientation);
                bpf.Add(ModelDictionary.getVehicleByName(veh.model));
                player.connection.write(bpf.getBytes());
            });
            return(veh);
        }
Ejemplo n.º 5
0
 public void EnterVehicle(ServerVehicle vehicle)
 {
     currentVehicleId = vehicle.id;
     var bpf = new BinaryPacketFormatter(Commands.NPC_walkTo);
     bpf.Add(id);
     bpf.Add(vehicle.id);
     broadcastEvent(bpf);
 }
 void api_onPlayerExitVehicle(ServerPlayer player, ServerVehicle vehicle)
 {
 }
Ejemplo n.º 7
0
 public void invokeOnPlayerExitVehicle(ServerPlayer player, ServerVehicle vehicle)
 {
     if (onPlayerExitVehicle != null) onPlayerExitVehicle.Invoke(player, vehicle);
 }