Here to remove old posts
these command could probably help you. ;D
-- Server script
RegisterCommand('cleardogs', function()
local source = source
local c,peds = GetEntityCoords(GetPlayerPed(source)),GetAllPeds()
for k,v in pairs()do
local p = GetEntityCoords(v)
if #(c-p) < 25.0 then
local model = GetEntityModel(v)
if model == GetHashKey('a_c_chop') or GetHashKey('a_c_coyote') or GetHashKey('a_c_husky') or GetHashKey('a_c_retriever') or GetHashKey('a_c_rottweiler') or GetHashKey('a_c_shepherd') then
DeleteEntity(v)
end
end
end
end, false)
thank you so so much !!!
1 Like
It tells you in the error - pairs()
needs something to iterate over.
It should be:
for k,v in pairs(peds) do
it works ! thank so so much for both of you
1 Like