xxxxxxxxxx
-- client
for _, ped in ipairs(GetGamePool('CPed')) do
if NetworkHasControlOfEntity(ped) then
local task = Entity(ped).state.task
if task == 1 then
if GetScriptTaskStatus(ped, 0xbba3b7ca) == 7 then -- see GetScriptTaskStatus docs for the hashes
TaskWanderStandard(ped, ) -- as in the usual args for TASK_WANDER_STANDARD
end
end
end
end