From 0fe55eb5432906016cc3526caf3f86d5bf85aff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Wed, 25 Mar 2020 17:13:06 +0300 Subject: CCopPed 2 and fixes --- src/core/EventList.cpp | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'src/core/EventList.cpp') diff --git a/src/core/EventList.cpp b/src/core/EventList.cpp index caf0cb3f..4364359a 100644 --- a/src/core/EventList.cpp +++ b/src/core/EventList.cpp @@ -5,10 +5,13 @@ #include "World.h" #include "Wanted.h" #include "EventList.h" +#include "Messages.h" +#include "Text.h" +#include "main.h" int32 CEventList::ms_nFirstFreeSlotIndex; -//CEvent gaEvent[NUMEVENTS]; -CEvent *gaEvent = (CEvent*)0x6EF830; +CEvent gaEvent[NUMEVENTS]; +//CEvent *gaEvent = (CEvent*)0x6EF830; enum { @@ -207,8 +210,20 @@ CEventList::ReportCrimeForEvent(eEventType type, int32 crimeId, bool copsDontCar default: crime = CRIME_NONE; break; } - if(crime == CRIME_NONE) - return; +#ifdef VC_PED_PORTS + if (crime == CRIME_HIT_PED && ((CPed*)crimeId)->IsPointerValid() && + FindPlayerPed()->m_pWanted->m_nWantedLevel == 0 && ((CPed*)crimeId)->m_ped_flagE2) { + + if(!((CPed*)crimeId)->DyingOrDead()) { + sprintf(gString, "$50 Good Citizen Bonus!"); + AsciiToUnicode(gString, gUString); + CMessages::AddBigMessage(gUString, 5000, 0); + CWorld::Players[CWorld::PlayerInFocus].m_nMoney += 50; + } + } else +#endif + if(crime == CRIME_NONE) + return; CVector playerPedCoors = FindPlayerPed()->GetPosition(); CVector playerCoors = FindPlayerCoors(); -- cgit v1.2.3