TaskPatrol
DocsTaskPatrol(ped, p1, p2, p3, p4)Description
After looking at some scripts the second parameter seems to be an id of some kind. Here are some I found from some R* scripts:
"miss_Tower_01" (this went from 01 - 10)
"miss_Ass0" (0, 4, 6, 3)
"MISS_PATROL_8"
I think they're patrol routes, but I'm not sure. And I believe the 3rd parameter is a BOOL, but I can't confirm other than only seeing 0 and 1 being passed.
As far as I can see the patrol routes names such as "miss_Ass0" have been defined earlier in the scripts. This leads me to believe we can defined our own new patrol routes by following the same approach.
From the scripts
TASK::OPEN_PATROL_ROUTE("miss_Ass0");
TASK::ADD_PATROL_ROUTE_NODE(0, "WORLD_HUMAN_GUARD_STAND", l_738[0/*3*/], -139.4076690673828, -993.4732055664062, 26.2754, MISC::GET_RANDOM_INT_IN_RANGE(5000, 10000));
TASK::ADD_PATROL_ROUTE_NODE(1, "WORLD_HUMAN_GUARD_STAND", l_738[1/*3*/], -116.1391830444336, -987.4984130859375, 26.38541030883789, MISC::GET_RANDOM_INT_IN_RANGE(5000, 10000));
TASK::ADD_PATROL_ROUTE_NODE(2, "WORLD_HUMAN_GUARD_STAND", l_738[2/*3*/], -128.46847534179688, -979.0340576171875, 26.2754, MISC::GET_RANDOM_INT_IN_RANGE(5000, 10000));
TASK::ADD_PATROL_ROUTE_LINK(0, 1);
TASK::ADD_PATROL_ROUTE_LINK(1, 2);
TASK::ADD_PATROL_ROUTE_LINK(2, 0);
TASK::CLOSE_PATROL_ROUTE();
TASK::CREATE_PATROL_ROUTE();Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
p1 | char* | — |
p2 | Any | — |
p3 | BOOL | — |
p4 | BOOL | — |
Quick Snippet: Get Ped Handleped
pedUse this to get the player ped handle for this native.
-- Get the player's ped handle (client-side)
local ped = PlayerPedId()
print("Ped handle: " .. ped)
-- For a specific player's ped (server-side):
-- local targetPed = GetPlayerPed(source)Ped Models

mp_m_freemode_01
player_zero
ig_agatha
s_m_y_cop_01
s_m_m_gaffer_01
g_m_m_armboss_01
a_c_boar
a_m_m_bevhills_01Returns
voidThis native does not return a value.