
How can I make these models be ignored? And prevent changes that will be made to people or animals with these models
I would advise you to set up a table, where the key is the hash of the ped model and the value is something not negative (not false and 0). Doing this allows up to essentially do a “lookup” in that table, without having to loop through it.
Here is an example of how it could be done:
local models = {
[`mp_m_freemode_01`] = true,
[`a_c_rabbit_01`] = true
}
CreateThread(function()
while true do
Wait(20)
for index, ped in pairs(GetGamePool("CPed")) do
local model = GetEntityModel(ped)
if models[model] then
-- The model is in the list, do something
end
end
end
end)
Hope this helps!
Thanks
1 Like