la pirula bots

Статус
В этой теме нельзя размещать новые ответы.

deathBit

Новичок
Автор темы
5
0
Hi,
how can i let a bot send server command in la pirula?
I had no idea about raknet stuff so I looked into "RakSAMP" project and it says for server command:

RakNet::BitStream bsParams;
int iStrlen = strlen(szCommand);
bsParams.Write(iStrlen);
bsParams.Write(szCommand, iStrlen);
pRakClient->RPC(&RPC_ServerCommand, &bsParams, HIGH_PRIORITY, RELIABLE, 0, FALSE, UNASSIGNED_NETWORK_ID, NULL);

I put that into la pirula but it doesn't work it send nothing

RakNet::BitStream bsSend;
BYTE byteTextLen = strlen(msg);
bsSend.Write(byteTextLen);
bsSend.Write(msg, byteTextLen);
SendRPC(iBotID, RPC_ServerCommand, bsSend, HIGH_PRIORITY, RELIABLE, 0, false);

btw: normal chat message works ..
YUNO.gif


btw2: why the "RPC" function in raksamp is different from la pirula? in la pirula the last two arguments are missing: "NetworkID networkID, RakNet::BitStream *replyFromTarget"

thx
 

itsLegend

Фонд борьбы за жуков 🐞
Администратор
2,695
1,448
Len of command need 4 bytes(integer). Change it.
Struct RPC Server command:
4 bytes - len
[len] bytes - command
 
Статус
В этой теме нельзя размещать новые ответы.

Похожие темы

  1. У
    • Закрыта
    Ответы
    1
    Просмотры
    1K
  2. Ответы
    5
    Просмотры
    5K