24.09.2018, 17:51
(
Последний раз редактировалось Zeus666; 24.09.2018 в 18:23.
)
PHP код:
ublic OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
if(IsPlayerRNPC(damagedid))
{
if(GetRNPCHealth(damagedid) < 0.0 && !rnpcData[damagedid][RNPC_DEAD])
{ GetPlayerPos(damagedid,fPos[0],fPos[1],fPos[2]);
CreateMilitaryLoots(fPos[0],fPos[1],fPos[2]);
}
}
}
PHP код:
function CreateMilitaryLoots(Float:pXX,Float:pYX,Float:pZX)
{
new strt[128];
lootCount += 1;
Loot[lootCount][xLoot] = pXX;
Loot[lootCount][yLoot] = pYX;
Loot[lootCount][zLoot] = pZX;
LootSetupMilitary();
Loot[lootCount][AntiDup] = 1;
Loot[lootCount][LootID] = CreateDynamicObject(Loot[lootCount][ModelID],pXX,pYX,pZX-0.9,Loot[lootCount][LootRotX],Loot[lootCount][LootRotY],Loot[lootCount][LootRotZ],-1,-1,-1,1000.0);
return 1;
}
But when RNCP is dead, it spawns the Loot without showing it via object. why?