Hi guys, I am with a error, you can help me ?
The first error is the vip.
I killed a player with vip and the loot not drop him, but when he comes to his lobby, the items are not there.
Thanks,
ATT. FRANCO
Printable View
Hi guys, I am with a error, you can help me ?
The first error is the vip.
I killed a player with vip and the loot not drop him, but when he comes to his lobby, the items are not there.
Thanks,
ATT. FRANCO
Please do not post only "help me please" or something similar in your title. Please be as short as possible with a PROPER description of your error / bug / mistake etc.
Secondly please provide more informations.
Source?
Who coded the VIP System?
Maybe post the code?
Sorry. I do not know the code because I give the source Brazilian forum
Source is Education
No, the vip system was coded.
I do not know where the code is located
Search for:
and post the whole function.Code:void obj_ServerPlayer::DoDeath()
(Server. Not client)
Code:void obj_ServerPlayer::DoDeath(){
gServerLogic.LogInfo(peerId_, "Death", ""); CLOG_INDENT;
deathTime = r3dGetTime();
if(profile_.ProfileData.AccountType == 2)
{
// drop all items
for(int i=0; i<loadout_->BackpackSize; i++)
{
const wiInventoryItem& wi = loadout_->Items[i];
if(wi.itemID > 0) {
BackpackDropItem(i);
}
}
// drop not-default backpack as well
if(loadout_->BackpackID != 20176)
{
// create network object
obj_DroppedItem* obj = (obj_DroppedItem*)srv_CreateGameObject("obj_DroppedItem", "obj_DroppedItem", GetRandomPosForItemDrop());
obj->SetNetworkID(gServerLogic.GetFreeNetId());
obj->NetworkLocal = true;
// vars
obj->m_Item.itemID = loadout_->BackpackID;
obj->m_Item.quantity = 1;
}
}
// set that character is dead
loadout_->Alive = 0;
loadout_->GamePos = GetPosition();
loadout_->Health = 0;
// clear attachments
if(profile_.ProfileData.AccountType == 2)
{
loadout_->Attachment[0].Reset();
loadout_->Attachment[1].Reset();
}
//NOTE: server WZ_Char_SRV_SetStatus will clear player backpack, so make that CJobUpdateChar::Exec() won't update it
savedLoadout_ = *loadout_;
gServerLogic.ApiPlayerUpdateChar(this);
SetLatePacketsBarrier("death");
return;
}
This is probably your mistake. If the AccountType is equal to 2 he drops everything. If not he drops nothingCode:if(profile_.ProfileData.AccountType == 2)
In my DataBase:
0 = VIP
2 = SURVIVOR
The vip is not to drop. For me I have to fix modify AccountType == 2 for AccountType == 0 ?
What do you exactly want? That VIP's can drop their stuff ? Or what?
I want the vip not drop loot. However when the vip dies he does not drop loot, but when going to the lobby loot vanish
Oh. I understand now. So you have a note here that describes how to fix it.
So either modify the saved procedure WZ_Char_SRV_SetStatus or remove theQuote:
//NOTE: server WZ_Char_SRV_SetStatus will clear player backpack, so make that CJobUpdateChar::Exec() won't update it
Quote:
gServerLogic.ApiPlayerUpdateChar(this);