Skip to content

Commit

Permalink
Merge pull request #98 from wadawdaw/patch-2
Browse files Browse the repository at this point in the history
Updated enet server test.cpp
  • Loading branch information
mempler authored Nov 26, 2018
2 parents 2f83d8d + 915217c commit f4f30d6
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions enet server test/enet server test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ struct PlayerInfo {
bool haveSuperSupporterName = false; // 16777216
bool haveSupperPineapple = false; // 33554432
//bool
int skinColor = 0x268DAFFF;
int skinColor = 0x8295C3FF; //normal SKin color like gt!

PlayerInventory inventory;

Expand Down Expand Up @@ -540,7 +540,7 @@ WorldInfo generateWorld(string name, int width, int height)
if (i == 3650)
world.items[i].foreground = 6;
else if (i >= 3600 && i<3700)
world.items[i].foreground = 16;
world.items[i].foreground = 0; //fixed the grass in the world!
if (i == 3750)
world.items[i].foreground = 8;
}
Expand Down Expand Up @@ -2462,14 +2462,27 @@ int _tmain(int argc, _TCHAR* argv[])
SendPacketRaw(4, packPlayerMoving(&data), 56, 0, peer, ENET_PACKET_FLAG_RELIABLE);
}
else if (str == "/help"){
GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "Supported commands are: /help, /mod, /unmod, /inventory, /item id, /team id, /color number, /who, /state number, /count, /sb message, /alt, /radio"));
GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "Supported commands are: /help, /mod, /unmod, /inventory, /item id, /team id, /color number, /who, /state number, /count, /sb message, /alt, /radio, /gem"));
ENetPacket * packet = enet_packet_create(p.data,
p.len,
ENET_PACKET_FLAG_RELIABLE);
enet_peer_send(peer, 0, packet);
delete p.data;
//enet_host_flush(server);
}
else if (str.substr(0, 5) == "/gem ") //gem if u want flex with ur gems!
{
GamePacket p = packetEnd(appendInt(appendString(createPacket(), "OnSetBux"), atoi(str.substr(5).c_str())));
ENetPacket * packet = enet_packet_create(p.data,
p.len,
ENET_PACKET_FLAG_RELIABLE);

enet_peer_send(peer, 0, packet);
delete p.data;
continue;


}
else if (str.substr(0, 9) == "/weather ") {
if (world->name != "ADMIN") {
if (world->owner != "") {
Expand Down

0 comments on commit f4f30d6

Please sign in to comment.