16.09.2018, 18:54
Olб pessoal, estou com um problema na minha GM, o AttachedObject nгo estб destruindo, olhem:
Qualquer objeto nгo estб destruindo, acredito que seja por causa que usa uma maneira meio diferente de criar os AttachedObject, se alguйm puder me ajuda eu agradeзo <3
PHP код:
new id = CountAttachedObjects(playerid);
SetPlayerAttachedObject(playerid,id,2226,5,0.394999,0.045000,0.027000,-25.299999,-101.699974);
SetPlayerAttachedObjectEx(2226,Vaga_Radio,playerid,id);
PHP код:
RemovePlayerAttachedObjectEx(playerid, Vaga_Radio);
PHP код:
stock CountAttachedObjects(playerid)
{
new count=-1;
new i=0;
while(i < MAX_PLAYER_ATTACHED_OBJECTS) {
if(PlayerInfo[playerid][pAcP] == 1 && i < 6)
{
i=6;
continue;
}
if(IsPlayerAttachedObjectSlotUsed(playerid, i)) {
i++;
continue;
}
else
{
count = i;
ultimoSlotEQ[playerid] = i;
i = MAX_PLAYER_ATTACHED_OBJECTS;
break;
}
}
if(count == -1) {
return SlotCheio[playerid] = 1;
}
return count;
}
PHP код:
BSR::RemovePlayerAttachedObjectEx(playerid,SlotReal)
{
if(ItemSlotA[playerid][SlotReal] != -1)
{
if(ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Aureola1 && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Aureola2
&& ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Celular && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Radio && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Pa
&& ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Maconha && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Escudo
&& ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Planta && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Corrente
&& ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Ejetar && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Ejetar2
&& ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Escudo && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Colete
&& ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Taser)
RemovePlayerAttachedObject(playerid, ItemSlotA[playerid][SlotReal]);
ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] = -1;
SlotDItem[playerid][ItemSlotA[playerid][SlotReal]] = -1;
ObjectLoad[playerid][ItemSlotA[playerid][SlotReal]][Objindexid2] = 0;
ItemSlotA[playerid][SlotReal] = -1;
}
}