file
C:\WZ\src\server\WO_GameServer\Sources\ServerGameLogic.cpp
it work
file
C:\WZ\src\server\WO_GameServer\Sources\ServerGameLogic.cpp
it work
My only
void ServerGameLogic::DoKillPlayer(GameObject* sourceObj, obj_ServerPlayer* targetPlr, STORE_CATEGORIES weaponCat, bool forced_by_server, bool fromPlayerInAir, bool targetPlayerInAir )
{
r3dOutToLog("%s morto por %s, forced: %d\n", targetPlr->userName, sourceObj->Name.c_str(), (int)forced_by_server);
// sent kill packet
{
PKT_S2C_KillPlayer_s n;
n.targetId = toP2pNetId(targetPlr->GetNetworkID());
n.killerWeaponCat = (BYTE)weaponCat;
n.forced_by_server = forced_by_server;
p2pBroadcastToActive(sourceObj, &n, sizeof(n));
}
new dnc
// Displaying Killfeed
char plr2msg[128] = {0};
if(IsServerPlayer(sourceObj))
{
obj_ServerPlayer * killedByPlr = ((obj_ServerPlayer*)sourceObj);
if(targetPlr->profile_.CustomerID == killedByPlr->profile_.CustomerID)
{
sprintf(plr2msg, "Commit Suicide");
char chatmessage[128] = {0};
PKT_C2C_ChatMessage_s n;
sprintf(chatmessage, "%s Suicided.",targetPlr->loadout_->Gamertag);
r3dscpy(n.gamertag, "<System>");
r3dscpy(n.msg, chatmessage);
n.msgChannel = 1;
n.userFlag = 2;
p2pBroadcastToAll(NULL, &n, sizeof(n), true);
}
else
{
sprintf(plr2msg, "KILLED BY %s", killedByPlr->loadout_->Gamertag);
//Enable this below to if you have "Player exp from my other tutorial"
//gServerLogic.AddPlayerReward(killedByPlr, RWD_PlayerKill, 0);// the 0 can be removed if your not using "Allright source"
char chatmessage[128] = {0};
PKT_C2C_ChatMessage_s n;
sprintf(chatmessage, "%s Killed By %s.",targetPlr->loadout_->Gamertag,killedByPlr->loadout_->Gamertag);
r3dscpy(n.gamertag, "<System>");
r3dscpy(n.msg, chatmessage);
n.msgChannel = 1;
n.userFlag = 2;
p2pBroadcastToAll(NULL, &n, sizeof(n), true);
}
}
else if(sourceObj->isObjType(OBJTYPE_Zombie))
{
sprintf(plr2msg, "EATEN BY ZOMBIE");
char chatmessage[128] = {0};
PKT_C2C_ChatMessage_s n;
sprintf(chatmessage, "Zombies Eat %s",targetPlr->loadout_->Gamertag);
r3dscpy(n.gamertag, "<System>");
r3dscpy(n.msg, chatmessage);
n.msgChannel = 1;
n.userFlag = 2;
p2pBroadcastToAll(NULL, &n, sizeof(n), true);
}
else
{
sprintf(plr2msg, "Commit Suicide");
}
// sent kill packet
{
PKT_S2C_KillPlayer_s n;
n.targetId = toP2pNetId(targetPlr->GetNetworkID());
n.killerWeaponCat = (BYTE)weaponCat;
n.forced_by_server = forced_by_server;
p2pBroadcastToActive(sourceObj, &n, sizeof(n));
}
where is the code