ped_spawner icon indicating copy to clipboard operation
ped_spawner copied to clipboard

add export createPed for other resources

Open baguscodestudio opened this issue 4 years ago • 0 comments

For me it makes it easier to handle peds in one resource, instead of adding more into the Config one by one. Usage:

            exports['ped_spawner']:createPed('HarvestSeller',{
                model = v.ped, -- change to your ped string
                coords = v.coords, -- ped coords
                heading = v.heading,  -- ped heading
                gender = v.gender,  -- ped gender 'male' or 'female'
                isRendered = false,
                ped = nil,
            })

Pair loop might be slower than the numeric loop but it is to enable non numeric key of the table to be looped as well.

baguscodestudio avatar Dec 21 '21 09:12 baguscodestudio