I tried with this:
All works except destroy the entity. I'll try with OnSpawnedEntity, because if entity is not spawned, you can't destroy it
Now it work, but when entity is destroyed, you see it, and can't interact with it. It seems entity is removed from server but not from client.
Code:
Code:
function OnSpawningEntity(World, Entity)
print(Entity:GetClass())
if (Entity:GetClass() == "cWolf" and World:GetBiomeAt(Entity:GetPosX(),Entity:GetPosZ()) ~= 4)then
print(Entity:GetClass().." spawning on "..World:GetBiomeAt(Entity:GetPosX(),Entity:GetPosZ()))
Entity:Destroy()
end
end
Now it work, but when entity is destroyed, you see it, and can't interact with it. It seems entity is removed from server but not from client.
Code:
Code:
function OnSpawnedEntity(World, Entity)
print(Entity:GetClass())
if (Entity:GetClass() == "cWolf" and World:GetBiomeAt(Entity:GetPosX(),Entity:GetPosZ()) ~= 4)then
print(Entity:GetClass().." spawning on "..World:GetBiomeAt(Entity:GetPosX(),Entity:GetPosZ()))
Entity:Destroy()
end
end