Most visitors online was 12720 , on 2 May 2024
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature currently requires accessing the site using the built-in Safari browser.
I got it working.@daniking1
BR
se você conseguir fixar esse bug e compartilhar com a gente eu fico muito grato
Eng
if you can fix this bug and share with us I'm very grateful
BR
Modos Fixados Explosivo e Annihilation
Eng
Fixed Modes Explosive and Annihilation
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Game_Server.Game;
namespace Game_Server.Room_Data
{
class CP_RoomData : Handler
{
internal enum DropType
{
Respawn = 0,
Medic = 1,
Ammo = 2,
Repair = 3
}
public override void Handle(User usr)
{
if (blocks.Length >= 2 && usr.room != null)
{
Room room = usr.room;
int roomSlot = int.Parse(getBlock(0));
int roomId = int.Parse(getBlock(1));
if (roomSlot == usr.roomslot && roomId == room.id)
{
Subtype type = (Subtype)int.Parse(getBlock(3));
object[] sendBlocks = new object[blocks.Length - 1];
Array.Copy(blocks, sendBlocks, sendBlocks.Length);
/* Handle each subtype (if handler is available) */
using (RoomDataHandler handler = Managers.RoomPacketManager.ParsePacket((int)type, sendBlocks))
{
if (handler != null)
{
handler.Handle(usr, room);
/* Send out packet to the room*/
sendBlocks = handler.sendBlocks;
int subtypeId = int.Parse(sendBlocks[3].ToString());
if (handler.sendPacket)
{
if (subtypeId == (int)Subtype.ServerRoomReady)
{
if (!room.firstingame)
{
room.RespawnAllVehicles();
room.firstingame = true;
}
if (room.MapData != null)
{
usr.send(new SP_RoomMapData(room));
usr.send(new SP_RoomInitializeUsers(room));
}
usr.mapLoaded = true;
usr.send(new SP_RoomData(sendBlocks));
}
else if (subtypeId == (int)Subtype.BackToRoom)
{
usr.send(new SP_RoomData(sendBlocks));
}
else if (subtypeId == (int)Subtype.VoteKick)
{
byte[] buffer = (new SP_RoomData(sendBlocks)).GetBytes();
int usrside = room.GetSide(usr);
foreach (User u in room.users.Values)
{
if (room.GetSide(u) == usrside)
{
u.sendBuffer(buffer);
}
}
}
else
{
room.send(new SP_RoomData(sendBlocks));
}
if (handler.lobbychanges)
{
room.ch.UpdateLobby(room);
}
}
}
}
}
}
}
}
class SP_RoomData : Packet
{
public SP_RoomData(params object[] Params)
{
newPacket(30000);
addBlock(1); // Success
Params.ToList().ForEach(r => { addBlock(r); });
}
}
class SP_RoomDataNewRound : Packet
{
public SP_RoomDataNewRound(Room Room, int WinningTeam, bool Prepare)
{
int Code = (Prepare == true ? 6 : 5);
newPacket(30000);
addBlock(1);
addBlock(-1);
addBlock(Room.id);
addBlock(1);
addBlock(Code);
addBlock(0);
addBlock(1);
addBlock(WinningTeam);
addBlock(Room.DerbRounds);
addBlock(Room.NIURounds);
Fill(0, 16);
addBlock("DS05");
}
}
class SP_InitializeNewRound : Packet
{
public SP_InitializeNewRound(Room r)
{
newPacket(30000);
addBlock(1); // Success
addBlock(-1); // ??
addBlock(r.id); // Room ID
addBlock(2);
addBlock(403); // Sub id?
addBlock(0);
addBlock(1);
addBlock(3);
addBlock(363);
addBlock(0);
addBlock(1);
// addBlock(r.mode == (int)RoomMode.Annihilation ? 1 : 0);
Fill(0, 4);
}
}
}
//Final