How to hook Vindictus

Posts 3145 of 50 · Page 3 of 4
Quote Originally Posted by kekitawong View Post
Does it bother you? I think it's an important one.

Trying to learn... but that's the nature of learning on forums, as I've experienced it. You try and might fail, then resort to asking for help. Some people are willing to help, some are impatient with noobs.. I wonder how many people can just learn everything on these forums like *snaps* It might be more than I think.. lol it might be the majority. I'm not one of those people, seeing as I really can't figure out what's wrong right now..
And this should be moved to tut section now
/moved

DAMN! WHERE'S MY MINION-SHIP!?
Quote Originally Posted by Ken Jeong View Post
/moved

DAMN! WHERE'S MY MINION-SHIP!?
Dont act like that.
That will just decrease chances of Minion
It takes at least 2 weeks for a minion to be chosen.
on tools there is no source-sdk that i can find please help!!
You own a Source engine game on Steam (except for HL2DM and HL2LC)?
yeah, i got them free with the nvidia steam version
Well, then you cant use the Source SDK, you'll have to buy a Source Engine game.
I get this error when trying to compile.
Code:
1>g:\mymod\cl_dll\main.cpp(65): error C2143: syntax error : missing ';' before 'public'
1>g:\mymod\cl_dll\main.cpp(67): error C2143: syntax error : missing ';' before 'public'
1>g:\mymod\cl_dll\main.cpp(69): error C2143: syntax error : missing ';' before 'public'
1>g:\mymod\cl_dll\main.cpp(71): error C2143: syntax error : missing ';' before 'public'
1>g:\mymod\cl_dll\main.cpp(80): warning C4130: '!=' : logical operation on address of string constant
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
here is my main.cpp
Code:
#include "SDK.h"
#include <iostream>
#include <fstream>
#include <conio.h>
#include <stdio.h>

#include "cbase.h"
#include "FileSystem.h"

using namespace std;

void MainThread(void)
{
	IVEngineClient  *pEngine = NULL;
	IVEngineClient	*engine = NULL;
	C_BasePlayer *localPlayer = NULL;
	ICvar  *cvar = NULL;

	
	CreateInterfaceFn ClientInterface;
	CreateInterfaceFn FileSystemInterface;
	CreateInterfaceFn EngineInterface;
	
	HMODULE hClient = NULL;
	HMODULE hEngine = NULL;

	while(hClient == NULL)
	{
		hClient = GetModuleHandle("client.dll");
		Sleep(3000);
	}

	while(hEngine == NULL)
	{
		hEngine = GetModuleHandle("engine.dll");
		Sleep(10000);
	}

	CreateInterfaceFn CIEngine = (CreateInterfaceFn)GetProcAddress(hEngine, "CreateInterface");
	cvar = (ICvar *)CIEngine("VEngineCvar003", 0);

	
	ConMsg(0, "Testing\n");

	EngineInterface = (CreateInterfaceFn)GetProcAddress(hEngine, "CreateInterface");

	//IGameConsole *m_pIGameConsole = (IGameConsole *)GameUIFactory(GAMECONSOLE_INTERFACE_VERSION, NULL);

	//if (m_pIGameConsole->IsConsoleVisible() == false) {
    //    m_pIGameConsole->Initialize();
	//	m_pIGameConsole->Activate();
	//}

	pEngine = (IVEngineClient*)EngineInterface("VEngineClient012", NULL);

	pEngine->ClientCmd("sv_cheats 1\n");

	ConVar *sv_cheats = cvar->FindVar( "sv_cheats" );
	while(!sv_cheats)
	{
    sv_cheats = cvar->FindVar( "sv_cheats" );
    Sleep(100);
	}
	public
	if(sv_cheats->IsBitSet(FCVAR_CHEAT))sv_cheats->m_nFlags &= ~FCVAR_CHEAT;
	public
    if(sv_cheats->IsBitSet(FCVAR_REPLICATED))sv_cheats->m_nFlags &= ~FCVAR_REPLICATED;
	public
    if(sv_cheats->IsBitSet(FCVAR_PROTECTED))sv_cheats->m_nFlags &= ~FCVAR_PROTECTED;
	public
    if(sv_cheats->IsBitSet(FCVAR_SPONLY))sv_cheats->m_nFlags &= ~FCVAR_SPONLY;
    sv_cheats->SetValue(1);
	
	AllocConsole();

	char str [82];
	str[0] = 80;
	cprintf("Enter console commands here:\n");

	while (str != "exit")
	{
		sv_cheats->SetValue(1);
		//cscanf("%256[0-9a-zA-Z ]s", str);
		cgets(str);
		pEngine->ClientCmd(&str[2]);
		cprintf("[ %s ] entered successfully.\n", &str[2]);
	}
}

BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpReserved )
{
	if( dwReason == DLL_PROCESS_ATTACH )
	{
		CreateThread( NULL, NULL, (LPTHREAD_START_ROUTINE)MainThread, NULL, NULL, NULL);
	}
	return TRUE;
}
Quote Originally Posted by troy896 View Post
I get this error when trying to compile.
Code:
1>g:\mymod\cl_dll\main.cpp(65): error C2143: syntax error : missing ';' before 'public'
1>g:\mymod\cl_dll\main.cpp(67): error C2143: syntax error : missing ';' before 'public'
1>g:\mymod\cl_dll\main.cpp(69): error C2143: syntax error : missing ';' before 'public'
1>g:\mymod\cl_dll\main.cpp(71): error C2143: syntax error : missing ';' before 'public'
1>g:\mymod\cl_dll\main.cpp(80): warning C4130: '!=' : logical operation on address of string constant
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
here is my main.cpp
Code:
#include "SDK.h"
#include <iostream>
#include <fstream>
#include <conio.h>
#include <stdio.h>

#include "cbase.h"
#include "FileSystem.h"

using namespace std;

void MainThread(void)
{
	IVEngineClient  *pEngine = NULL;
	IVEngineClient	*engine = NULL;
	C_BasePlayer *localPlayer = NULL;
	ICvar  *cvar = NULL;

	
	CreateInterfaceFn ClientInterface;
	CreateInterfaceFn FileSystemInterface;
	CreateInterfaceFn EngineInterface;
	
	HMODULE hClient = NULL;
	HMODULE hEngine = NULL;

	while(hClient == NULL)
	{
		hClient = GetModuleHandle("client.dll");
		Sleep(3000);
	}

	while(hEngine == NULL)
	{
		hEngine = GetModuleHandle("engine.dll");
		Sleep(10000);
	}

	CreateInterfaceFn CIEngine = (CreateInterfaceFn)GetProcAddress(hEngine, "CreateInterface");
	cvar = (ICvar *)CIEngine("VEngineCvar003", 0);

	
	ConMsg(0, "Testing\n");

	EngineInterface = (CreateInterfaceFn)GetProcAddress(hEngine, "CreateInterface");

	//IGameConsole *m_pIGameConsole = (IGameConsole *)GameUIFactory(GAMECONSOLE_INTERFACE_VERSION, NULL);

	//if (m_pIGameConsole->IsConsoleVisible() == false) {
    //    m_pIGameConsole->Initialize();
	//	m_pIGameConsole->Activate();
	//}

	pEngine = (IVEngineClient*)EngineInterface("VEngineClient012", NULL);

	pEngine->ClientCmd("sv_cheats 1\n");

	ConVar *sv_cheats = cvar->FindVar( "sv_cheats" );
	while(!sv_cheats)
	{
    sv_cheats = cvar->FindVar( "sv_cheats" );
    Sleep(100);
	}
	public
	if(sv_cheats->IsBitSet(FCVAR_CHEAT))sv_cheats->m_nFlags &= ~FCVAR_CHEAT;
	public
    if(sv_cheats->IsBitSet(FCVAR_REPLICATED))sv_cheats->m_nFlags &= ~FCVAR_REPLICATED;
	public
    if(sv_cheats->IsBitSet(FCVAR_PROTECTED))sv_cheats->m_nFlags &= ~FCVAR_PROTECTED;
	public
    if(sv_cheats->IsBitSet(FCVAR_SPONLY))sv_cheats->m_nFlags &= ~FCVAR_SPONLY;
    sv_cheats->SetValue(1);
	
	AllocConsole();

	char str [82];
	str[0] = 80;
	cprintf("Enter console commands here:\n");

	while (str != "exit")
	{
		sv_cheats->SetValue(1);
		//cscanf("%256[0-9a-zA-Z ]s", str);
		cgets(str);
		pEngine->ClientCmd(&str[2]);
		cprintf("[ %s ] entered successfully.\n", &str[2]);
	}
}

BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpReserved )
{
	if( dwReason == DLL_PROCESS_ATTACH )
	{
		CreateThread( NULL, NULL, (LPTHREAD_START_ROUTINE)MainThread, NULL, NULL, NULL);
	}
	return TRUE;
}
Think you can Pm me your main.cpp file? I could try to fix it.
(Btw to clear off all other possibilities, you ran Source SDK [through Steam] to Create a Source Code-only Mod with the 2006 Base right? then you went to your MyMod folder, found Game_HL2-2005.sln and opened it to convert to 2010. You deleted server_hl2 from the Solution explorer interface within Microsoft Visual Studio, and set the correct properties on client_hl2. Now after that you deleted all the C++ files in the Source Files Folder and without leaving a single C++ file in the subdirectories of Source Files right? Then, all that's left is to check your main.cpp and SDK.h.

Quote Originally Posted by troy896 View Post
I get this error when trying to compile.
Code:
1>g:\mymod\cl_dll\main.cpp(65): error C2143: syntax error : missing ';' before 'public'
1>g:\mymod\cl_dll\main.cpp(67): error C2143: syntax error : missing ';' before 'public'
1>g:\mymod\cl_dll\main.cpp(69): error C2143: syntax error : missing ';' before 'public'
1>g:\mymod\cl_dll\main.cpp(71): error C2143: syntax error : missing ';' before 'public'
1>g:\mymod\cl_dll\main.cpp(80): warning C4130: '!=' : logical operation on address of string constant
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
here is my main.cpp
Code:
#include "SDK.h"
#include <iostream>
#include <fstream>
#include <conio.h>
#include <stdio.h>

#include "cbase.h"
#include "FileSystem.h"

using namespace std;

void MainThread(void)
{
	IVEngineClient  *pEngine = NULL;
	IVEngineClient	*engine = NULL;
	C_BasePlayer *localPlayer = NULL;
	ICvar  *cvar = NULL;

	
	CreateInterfaceFn ClientInterface;
	CreateInterfaceFn FileSystemInterface;
	CreateInterfaceFn EngineInterface;
	
	HMODULE hClient = NULL;
	HMODULE hEngine = NULL;

	while(hClient == NULL)
	{
		hClient = GetModuleHandle("client.dll");
		Sleep(3000);
	}

	while(hEngine == NULL)
	{
		hEngine = GetModuleHandle("engine.dll");
		Sleep(10000);
	}

	CreateInterfaceFn CIEngine = (CreateInterfaceFn)GetProcAddress(hEngine, "CreateInterface");
	cvar = (ICvar *)CIEngine("VEngineCvar003", 0);

	
	ConMsg(0, "Testing\n");

	EngineInterface = (CreateInterfaceFn)GetProcAddress(hEngine, "CreateInterface");

	//IGameConsole *m_pIGameConsole = (IGameConsole *)GameUIFactory(GAMECONSOLE_INTERFACE_VERSION, NULL);

	//if (m_pIGameConsole->IsConsoleVisible() == false) {
    //    m_pIGameConsole->Initialize();
	//	m_pIGameConsole->Activate();
	//}

	pEngine = (IVEngineClient*)EngineInterface("VEngineClient012", NULL);

	pEngine->ClientCmd("sv_cheats 1\n");

	ConVar *sv_cheats = cvar->FindVar( "sv_cheats" );
	while(!sv_cheats)
	{
    sv_cheats = cvar->FindVar( "sv_cheats" );
    Sleep(100);
	}
	public
	if(sv_cheats->IsBitSet(FCVAR_CHEAT))sv_cheats->m_nFlags &= ~FCVAR_CHEAT;
	public
    if(sv_cheats->IsBitSet(FCVAR_REPLICATED))sv_cheats->m_nFlags &= ~FCVAR_REPLICATED;
	public
    if(sv_cheats->IsBitSet(FCVAR_PROTECTED))sv_cheats->m_nFlags &= ~FCVAR_PROTECTED;
	public
    if(sv_cheats->IsBitSet(FCVAR_SPONLY))sv_cheats->m_nFlags &= ~FCVAR_SPONLY;
    sv_cheats->SetValue(1);
	
	AllocConsole();

	char str [82];
	str[0] = 80;
	cprintf("Enter console commands here:\n");

	while (str != "exit")
	{
		sv_cheats->SetValue(1);
		//cscanf("%256[0-9a-zA-Z ]s", str);
		cgets(str);
		pEngine->ClientCmd(&str[2]);
		cprintf("[ %s ] entered successfully.\n", &str[2]);
	}
}

BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpReserved )
{
	if( dwReason == DLL_PROCESS_ATTACH )
	{
		CreateThread( NULL, NULL, (LPTHREAD_START_ROUTINE)MainThread, NULL, NULL, NULL);
	}
	return TRUE;
}
The bolded part is where your main.cpp is having trouble. You should be placing something like a ':' after 'public' for it to register with Intellisense as a keyword, but you don't even need 'public' there at all. Just get rid of the publics. You can either manually do it, or replace the bolded part above with this:

Code:
ConVar *sv_cheats = cvar->FindVar( "sv_cheats" );

	while(!sv_cheats)
	{
    sv_cheats = cvar->FindVar( "sv_cheats" );
    Sleep(100);
	}

	if(sv_cheats->IsBitSet(FCVAR_CHEAT))sv_cheats->m_nFlags &= ~FCVAR_CHEAT;
    if(sv_cheats->IsBitSet(FCVAR_REPLICATED))sv_cheats->m_nFlags &= ~FCVAR_REPLICATED;
    if(sv_cheats->IsBitSet(FCVAR_PROTECTED))sv_cheats->m_nFlags &= ~FCVAR_PROTECTED;
    if(sv_cheats->IsBitSet(FCVAR_SPONLY))sv_cheats->m_nFlags &= ~FCVAR_SPONLY;
    sv_cheats->SetValue(1);
THe other method as I said above, is just take:
Code:
ConVar *sv_cheats = cvar->FindVar( "sv_cheats" );
	while(!sv_cheats)
	{
    sv_cheats = cvar->FindVar( "sv_cheats" );
    Sleep(100);
	}
	public
	if(sv_cheats->IsBitSet(FCVAR_CHEAT))sv_cheats->m_nFlags &= ~FCVAR_CHEAT;
	public
    if(sv_cheats->IsBitSet(FCVAR_REPLICATED))sv_cheats->m_nFlags &= ~FCVAR_REPLICATED;
	public
    if(sv_cheats->IsBitSet(FCVAR_PROTECTED))sv_cheats->m_nFlags &= ~FCVAR_PROTECTED;
	public
    if(sv_cheats->IsBitSet(FCVAR_SPONLY))sv_cheats->m_nFlags &= ~FCVAR_SPONLY;
    sv_cheats->SetValue(1);
take the bold 'publics' and just delete them. then make the code look a little nicer by indenting where you should for structure and all that. then try to compile.
yes, but wheneverr i remove the publics, i get this error. the same error you recieved at first
Code:
1>------ Build started: Project: client_hl2, Configuration: Debug HL2 Win32 ------
1>  main.cpp
1>g:\mymod\cl_dll\main.cpp(64): error C2143: syntax error : missing ';' before 'public'
1>g:\mymod\cl_dll\main.cpp(66): error C2248: 'ConCommandBase::m_nFlags' : cannot access private member declared in class 'ConCommandBase'
1>          g:\mymod\public\tier1\convar.h(191) : see declaration of 'ConCommandBase::m_nFlags'
1>          g:\mymod\public\tier1\convar.h(130) : see declaration of 'ConCommandBase'
1>g:\mymod\cl_dll\main.cpp(67): error C2248: 'ConCommandBase::m_nFlags' : cannot access private member declared in class 'ConCommandBase'
1>          g:\mymod\public\tier1\convar.h(191) : see declaration of 'ConCommandBase::m_nFlags'
1>          g:\mymod\public\tier1\convar.h(130) : see declaration of 'ConCommandBase'
1>g:\mymod\cl_dll\main.cpp(68): error C2248: 'ConCommandBase::m_nFlags' : cannot access private member declared in class 'ConCommandBase'
1>          g:\mymod\public\tier1\convar.h(191) : see declaration of 'ConCommandBase::m_nFlags'
1>          g:\mymod\public\tier1\convar.h(130) : see declaration of 'ConCommandBase'
1>g:\mymod\cl_dll\main.cpp(77): warning C4130: '!=' : logical operation on address of string constant
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
and sure.
acherongaming.com/main.cpp
i am really bad of using codes
but thx anyway.
Quote Originally Posted by troy896 View Post
yes, but wheneverr i remove the publics, i get this error. the same error you recieved at first
Code:
1>------ Build started: Project: client_hl2, Configuration: Debug HL2 Win32 ------
1>  main.cpp
1>g:\mymod\cl_dll\main.cpp(64): error C2143: syntax error : missing ';' before 'public'
1>g:\mymod\cl_dll\main.cpp(66): error C2248: 'ConCommandBase::m_nFlags' : cannot access private member declared in class 'ConCommandBase'
1>          g:\mymod\public\tier1\convar.h(191) : see declaration of 'ConCommandBase::m_nFlags'
1>          g:\mymod\public\tier1\convar.h(130) : see declaration of 'ConCommandBase'
1>g:\mymod\cl_dll\main.cpp(67): error C2248: 'ConCommandBase::m_nFlags' : cannot access private member declared in class 'ConCommandBase'
1>          g:\mymod\public\tier1\convar.h(191) : see declaration of 'ConCommandBase::m_nFlags'
1>          g:\mymod\public\tier1\convar.h(130) : see declaration of 'ConCommandBase'
1>g:\mymod\cl_dll\main.cpp(68): error C2248: 'ConCommandBase::m_nFlags' : cannot access private member declared in class 'ConCommandBase'
1>          g:\mymod\public\tier1\convar.h(191) : see declaration of 'ConCommandBase::m_nFlags'
1>          g:\mymod\public\tier1\convar.h(130) : see declaration of 'ConCommandBase'
1>g:\mymod\cl_dll\main.cpp(77): warning C4130: '!=' : logical operation on address of string constant
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
and sure.
acherongaming.com/main.cpp
the bold means you still didn't get rid of the public.

and to fix those ConCommandBase errors, go to the definition of 'm_nFlags.' (right click-> Go to definition.) It will take you to Convar.h. Scroll up from the definition a little, and you will see keyword 'public'. add a ':' right after THAT public. Recompile (MAKE SURE THERE ARE NO 'public' KEYWORDS IN main.cpp anymore)

Inside main.cpp, get rid of all the 'public' keywords. From what i sent before, it should look like this:

Code:
ConVar *sv_cheats = cvar->FindVar( "sv_cheats" );

	while(!sv_cheats)
	{
    sv_cheats = cvar->FindVar( "sv_cheats" );
    Sleep(100);
	}

	if(sv_cheats->IsBitSet(FCVAR_CHEAT))sv_cheats->m_nFlags &= ~FCVAR_CHEAT;
    if(sv_cheats->IsBitSet(FCVAR_REPLICATED))sv_cheats->m_nFlags &= ~FCVAR_REPLICATED;
    if(sv_cheats->IsBitSet(FCVAR_PROTECTED))sv_cheats->m_nFlags &= ~FCVAR_PROTECTED;
    if(sv_cheats->IsBitSet(FCVAR_SPONLY))sv_cheats->m_nFlags &= ~FCVAR_SPONLY;
    sv_cheats->SetValue(1);
Just [right click->Go to definition] on one of the 'm_nFlags', bolded above for your convenience. Take your pick, any will do.

Basically it will look like this when you find it:

Code:
public
	// Has the cvar been added to the global list?
	bool						m_bRegistered;

	// Static data
	char const 					*m_pszName;
	char const 					*m_pszHelpString;
	
	// ConVar flags
	int							m_nFlags;
So change it to this:
Code:
public:
	// Has the cvar been added to the global list?
	bool						m_bRegistered;

	// Static data
	char const 					*m_pszName;
	char const 					*m_pszHelpString;
	
	// ConVar flags
	int							m_nFlags;
Recompile after you change that. Hope this fixes your problem.
Quote Originally Posted by Hell_Demon View Post
By the way, Vindictus uses "VEngineClient012" instead of 11 other interface versions may have changed as well.
It worked either way.
when i went to definition, it already had the public:. Can you add me on msn so we can talk? punisher8966@hotmai....l.com
Quote Originally Posted by troy896 View Post
when i went to definition, it already had the public:. Can you add me on msn so we can talk? punisher8966@hotmai....l.com
i don't have hotmail... any other way?
Posts 3145 of 50 · Page 3 of 4
This thread is closed for replies.

Tags for this Thread

None

Need help?