Quantcast

Jump to content

» «
Photo

How to fix gta v DLC spawn car in SP

No replies to this topic
DaniTR
  • DaniTR

    Player Hater

  • New Members
  • Joined: 2 weeks ago
  • Spain

#1

Posted 2 weeks ago Edited by DaniTR, 2 weeks ago.

Hello im a beginner in c++ mods,im doing a dll mod for gta v SP,but when i spawn a dlc car like Nero it disappears i have found the solution(Only C++)the problem is beggined by the rockstar´s vehicles lock, that block the attemp of DLC´s spawn cars here is the solution:
Add this archives to your project:
(There are 4 archives)
and add this to your main.ccp or the file that have DLL_PROCES_ATTACH:
#include "..\..\inc\main.h"
#include "script.h"
#include "keyboard.h" 
#include "EnableCars.h"
#include "stdafx.h"
#pragma once
#include <SDKDDKVer.h>
DWORD WINAPI MainEntryPoint(LPVOID lpParam)
        {
EnableCars::Run((HINSTANCE)lpParam);
return 0;
}
 
BOOL WINAPI DllMain2(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpReserved)
{
BOOL bReturnValue = TRUE;
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)MainEntryPoint, hinstDLL, NULL, NULL);
break;
 
}
 
}




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users