Vice City Multiplayer

General Discussion => Support => Topic started by: scripter_pawn on December 21, 2012, 10:43:49 am

Title: Windows normal vc:mp server
Post by: scripter_pawn on December 21, 2012, 10:43:49 am
I need some details about the 0.3z(R2) servers :
1. The params for the server converted in c++ Connect() (RakPeerInterference.h library) void . Here are the params found in config.ini :
ip : 127.0.0.1
listen port : 5192
rcon port : 5192
password (admin) = lol
password (server) = false (i mean it isnt enabled)
so if someone can convert it in that code , ex : Connect("127.0.0.1",5192,....);
2.The minimum and specify the functions i need to make and continue a simple connection to server. Ex :
- you need to connect to it
- you need to send it (bla bla bla)
3.Aditional things i might know about connecting to this server.
<<THX IN ADVENCE>>

                                                                                                                                                                                     (scripter_pawn)
Title: Re: Windows normal vc:mp server
Post by: VRocker on December 21, 2012, 08:51:10 pm
Quote
<KroniX> hey Vrocker could you answer to this question , please? or give me the RPC4 code here please. Thanks.

No :)
Title: Re: Windows normal vc:mp server
Post by: stormeus on December 21, 2012, 11:18:56 pm
I need some details about the 0.3z(R2) servers
No :)

Not only do you have no idea how to write code for a server compatible with VC:MP, you also don't know how to use RakNet. Even then, I highly doubt you understand much about C++.

Even then, I am extremely doubtful that maxorator (or anyone, for that matter) would give you the information you want, because then you end up with security issues and/or overly attached "programmers."
Title: Re: Windows normal vc:mp server
Post by: scripter_pawn on December 22, 2012, 01:39:20 pm
allright allright , i understood you cant give me teh code cuz it may be dangerous to use from someone like me but , just tell me if this is right , and if it is , give me a list or a command list for vcmp windows server RPCs
Code: [Select]
// XServer.cpp : Defines the entry point for the console application.
//
#include <iostream>
#include "RakPeerInterface.h"
#include "PacketLogger.h"
#include <stdlib.h>
#include "WindowsIncludes.h"
#include "Gets.h"
#include "RPC4Plugin.h"
#include "RakSleep.h"

using namespace RakNet;

RPC4 rpc4;

void CFunc1( RakNet::BitStream *bitStream, RakNet::BitStream *returnData, Packet *packet )
{
//printf("CFunc3 ");
RakNet::RakString data;
//int offset=bitStream->GetReadOffset();
bool read = bitStream->ReadCompressed(data);
RakAssert(read);
printf("%s\n", data.C_String());
returnData->WriteCompressed("CFunc7");
};

int main()
{
RakNet::RakPeerInterface *sv = RakNet::RakPeerInterface::GetInstance();
//RakNet::PublicKey *pk;
//if(sv->Connect("127.0.0.1",5192,"ios",sizeof("ios"),0) == RakNet::CONNECTION_ATTEMPT_STARTED) printf("Connection started!\n");
//sv->Connect("127.0.0.1",5192,"ios",sizeof("ios"),0);
//rpc4.RegisterBlockingFunction("CFunc1", CFunc1);
RakNet::Packet *pak;
sv->AttachPlugin(&rpc4);
RakNet::SocketDescriptor sod;
sv->Startup(10,&sod,1);
sv->Connect("127.0.0.1",1234,"ios",sizeof("ios"));
char msg[2048];


RakNet::BitStream comp1 , comp2;
while(1)
{
Gets(msg,sizeof(msg));
if (strcmp(msg,"connect") == 0)
{
comp1.Write(6);
comp1.Write(sizeof("ion"));
comp1.Write("ion",sizeof("ion"));
rpc4.Call("ClientJoin",&comp1,HIGH_PRIORITY,RELIABLE_ORDERED,0,sv->GetSystemAddressFromIndex(0),false);
for(pak=sv->Receive();pak;sv->DeallocatePacket(pak),pak=sv->Receive())
{
printf("%s\n",pak->data);
break;
}
}
}


//rpc4.CallBlocking("Blocking",&comp1,HIGH_PRIORITY,RELIABLE_ORDERED,0,sv->GetSystemAddressFromIndex(0),&comp2);
/*
while (1)
{
Gets(msg,sizeof(msg));
if (strcmp(msg,"signal") == 0)
{
rpc4.CallBlocking("Blocking",&comp1,HIGH_PRIORITY,RELIABLE_ORDERED,0,sv->GetSystemAddressFromIndex(0),&comp2);
for(pak=sv->Receive();pak;sv->DeallocatePacket(pak),pak=sv->Receive());
{
RakNet::RakString rcs;
bool rdt = comp2.ReadCompressed(rcs);
printf("%s\n",rcs.C_String());
break;
}
}
*/
for(pak=sv->Receive();pak;sv->DeallocatePacket(pak),pak=sv->Receive())
{

printf("%s\n",pak->data);


}

//}

//for(pak=sv->Receive();pak;sv->DeallocatePacket(pak),sv->Receive())
// ;
//RakNet::RakString rcs1;
//bool rdt = comp1.ReadCompressed(rcs1);
//printf("it is : %s\n",rcs1.C_String());
// break;
//}



getchar();

RakNet::RakPeerInterface::DestroyInstance(sv);
return 0;
}



notice : i tested sv->connect , returns true so it connects , but when i type msg , i dont recive something ... oh and the .call retrurns null ... thx
Title: Re: Windows normal vc:mp server
Post by: VRocker on December 22, 2012, 04:39:50 pm
Jesus christ... Still trying? How many times have you been told...

YOU WONT BE ABLE TO MAKE YOUR OWN VCMP CLIENT OR SERVER

You don't understand how RakNet works, you don't understand C++, hell you don't even understand how VCMP itself works. You just think that it is so simple that anybody can do it by copying and pasting a tutorial. Well, NO YOU CANNOT.

There are so many things wrong here. First of all you think all versions of raknet are compatible with eachother, they are not. You also seem to think that sending random data in a packet will get a responce. You need to send specific data in a specific order with specific packet IDs. You still havn't got this through your thick skull after being told for over a fucking year.

You don't even take the time to try and learn, you just continue copying and pasting tutorials then moan either here or IRC that you can't connect to a VCMP server but you can connect to a tutorial that you compiled.

Even if you did somehow manage to make a connection (which you wont do this decade) what then? What do you plan to do with this connection?

Only experienced coders with knowledge in reverse engineering, RakNet and basic networking fundamentals (all of which you lack) will actually be able to connect to a VCMP server. Even then it requires quite a bit of work to actually do anything, i think i spent a few weeks getting the VCMP Squirrel server working correctly, then a few months ironing out the bugs. This is something that cannot be done overnight.

I would suggest you give up on this venture (you have been trying for over a year and got _nowhere_) and start off simple. Learn C++, learn basic networking, try coding something yourself for a change instead of copying and pasting. And before you say it, no you do not know C++, the questions you ask me in IRC prove that beyond a doubt.
Title: Re: Windows normal vc:mp server
Post by: stormeus on December 22, 2012, 07:18:11 pm
VRocker has already summed it up. Besides, the VC:MP development team offers no support for third-party clients and servers.

Locked