World and Peds

This commit is contained in:
eray orçunus 2019-09-12 03:43:18 +03:00
parent 3378cad058
commit 14c7c1d7ca
19 changed files with 505 additions and 17 deletions

View file

@ -141,10 +141,9 @@ SpawnCar(int id)
static void
LetThemFollowYou(void) {
CPed* player = (CPed*) FindPlayerPed();
CPed *player = (CPed*) FindPlayerPed();
for (int i = 0; i < player->m_numNearPeds; i++) {
CPed* nearPed = player->m_nearPeds[i];
CPed *nearPed = player->m_nearPeds[i];
if (nearPed && !nearPed->IsPlayer()) {
nearPed->SetObjective(OBJECTIVE_FOLLOW_PED_IN_FORMATION, (void*)player);
nearPed->m_pedFormation = rand() & 7;