CLEO Help Rejoin Packet RPC

CLEO related
Status
Not open for further replies.

fahrein

Active member
Joined
Apr 18, 2014
Messages
103
Reaction score
0
How to name change but no disconnect packet I send rpc_clientjoin packet join server server?

What functions?
 

m1zg4rd_PL

Well-known member
Joined
Jul 19, 2013
Messages
222
Reaction score
0
I don't understand, you mean how to send packet that will rejoin you on server (reconnect) or you want to change packets on the fly?
 

fahrein

Active member
Joined
Apr 18, 2014
Messages
103
Reaction score
0
I change local name.
I send join packet(Rpc_clientjoin)
No samp disconnect packet. (not Samp disconnect(0) function)

These are cleo impossible?
 

.silent

Well-known member
Joined
Apr 14, 2013
Messages
339
Reaction score
13
He wants to 'change' his nickname without reconnecting by using RPC_ClientJoin packet, which will 'overwrite' the data thus changing his nikcname (but OnPlayerConnect will be called on the server on the same slot twice without disconnecting)
This is how this packet is created and sent through RakNet
(c++)
Code:
	char nick[] = "yourNewName";
	strcpy(playerInfo[g_myPlayerID].szPlayerName, nick);
	RakNet::BitStream bsSend;
	char auth_bs[4*16] = {0};
        pSamp->getSerial(auth_bs);  
        BYTE byteAuthBSLen = (BYTE)strlen(auth_bs);
	BYTE byteMod = 1;
	BYTE byteNameLen = (BYTE)strlen(nick);
	unsigned int uiClientChallengeResponse = settings.uiChallange ^ iVersion;
	
	bsSend.Write(NETGAME_VERSION);
	bsSend.Write(byteMod);
	bsSend.Write(byteNameLen);
	bsSend.Write(nick, byteNameLen);
	bsSend.Write(uiClientChallengeResponse);
	bsSend.Write(byteAuthBSLen);
	bsSend.Write(auth_bs, byteAuthBSLen);
	pRakClient->RPC(&RPC_ClientJoin, &bsSend, HIGH_PRIORITY, RELIABLE, 0, FALSE, UNASSIGNED_NETWORK_ID, NULL);
Im pretty sure I remember that SAMPFuncs or whatever was giving the ability to use some parts of RakNet in CLEO.
 
Status
Not open for further replies.
Top