CreateGuard
Creates a guard that can be assigned a route
| Argument | Data Type | Needed | Default | Description |
|---|---|---|---|---|
model | string/number | - | The ped model | |
coords | vector3 | - | ||
heading | number | - | ||
difficulty | string | - | Can be: easy, medium, hard, veryhard | |
guardRoute | route | - | The route id (created using CreateGuardRoute) |
Returns
| Data Type | Description |
|---|---|
| ped | The guard ped |
Dont need to be called every frame
Example
local guard = CreateGuard("mp_m_securoguard_01", vector3(241.67, 222.49, 106.29), 0.0, "easy")
GiveWeaponToPed(guard, `WEAPON_PISTOL`, 255, false, true)