diff --git a/TASK/AddPatrolRouteLink.md b/TASK/AddPatrolRouteLink.md index aa86a6093..d4aa44f1c 100644 --- a/TASK/AddPatrolRouteLink.md +++ b/TASK/AddPatrolRouteLink.md @@ -5,11 +5,27 @@ ns: TASK ```c // 0x23083260DEC3A551 0xD8761BB3 -void ADD_PATROL_ROUTE_LINK(Any p0, Any p1); +void ADD_PATROL_ROUTE_LINK(int id1, int id2); ``` +connects/links 2 [route nodes](#_0x8EDF950167586B7C) +image representing the cyclic example below: +![image](https://user-images.githubusercontent.com/55803068/188470866-c32c6a9f-a25d-4772-9b18-5be46e2c14a1.png) ## Parameters -* **p0**: -* **p1**: +* **id1**: the id representing the first route node +* **id2**: the id representing the second route node +## Examples + +```lua +-- these lines connect 1,2,3,4,5,6 in a cyclic manner (1 > 2 > 3 > 4 > 5 > 6 > 1) + + +AddPatrolRouteLink(1,2) +AddPatrolRouteLink(2,3) +AddPatrolRouteLink(3,4) +AddPatrolRouteLink(4,5) +AddPatrolRouteLink(5,6) +AddPatrolRouteLink(6,1) +``` diff --git a/TASK/AddPatrolRouteNode.md b/TASK/AddPatrolRouteNode.md index fe014ced1..c8fe6f8e8 100644 --- a/TASK/AddPatrolRouteNode.md +++ b/TASK/AddPatrolRouteNode.md @@ -5,30 +5,25 @@ ns: TASK ```c // 0x8EDF950167586B7C 0x21B48F10 -void ADD_PATROL_ROUTE_NODE(int p0, char* p1, float x1, float y1, float z1, float x2, float y2, float z2, int p8); +void ADD_PATROL_ROUTE_NODE(int id, char* guardScenario, float x1, float y1, float z1, float x2, float y2, float z2, int waitTime); ``` -``` -Example: -TASK::ADD_PATROL_ROUTE_NODE(2, "WORLD_HUMAN_GUARD_STAND", -193.4915, -2378.864990234375, 10.9719, -193.4915, -2378.864990234375, 10.9719, 3000); -p0 is between 0 and 4 in the scripts. -p1 is "WORLD_HUMAN_GUARD_STAND" or "StandGuard". -p2, p3 and p4 is only one parameter sometimes in the scripts. Most likely a Vector3 hence p2, p3 and p4 are coordinates. -Examples: -TASK::ADD_PATROL_ROUTE_NODE(1, "WORLD_HUMAN_GUARD_STAND", l_739[7/*3*/], 0.0, 0.0, 0.0, 0); -TASK::ADD_PATROL_ROUTE_NODE(1, "WORLD_HUMAN_GUARD_STAND", l_B0[17/*44*/]._f3, l_B0[17/*44*/]._f3, 2000); -p5, p6 and p7 are for example set to: 1599.0406494140625, 2713.392578125, 44.4309. -p8 is an int, often random set to for example: MISC::GET_RANDOM_INT_IN_RANGE(5000, 10000). -``` +x2,y2 and z2 are the coordinates to which the ped should look at ## Parameters -* **p0**: -* **p1**: -* **x1**: -* **y1**: -* **z1**: -* **x2**: -* **y2**: -* **z2**: -* **p8**: +* **id**: is an integer that "identifies" the route node for linking to the route with ADD_PATROL_ROUTE_LINK. +* **guardScenario**: can be "WORLD_HUMAN_GUARD_STAND" or "StandGuard" +* **x1**: destination +* **y1**: destination +* **z1**: destination +* **x2**: coordinates to which the ped should look +* **y2**: coordinates to which the ped should look +* **z2**: coordinates to which the ped should look +* **waitTime**: written in ms +## Examples + +```lua +-- the guard will go toward vector3(1.0, 1.0, 1.0) coordinates looking toward vector3(0.0, 0.0, 0.0) coordinates waiting 1000ms with the WORLD_HUMAN_GUARD_STAND animation +AddPatrolRouteNode(1, "WORLD_HUMAN_GUARD_STAND", vector3(1.0, 1.0, 1.0), vector3(0.0, 0.0, 0.0), 1000) +```