dphome
Well-known member
Hmm, what is wrong?
PHP:
void RakClient::name_hook(const char *buf, const char *fmt, const char *name, const int id)
{
BYTE nameLen = (BYTE)strlen(name);
BitStream bsSend;
bsSend.Write(buf);
bsSend.Write(fmt);
bsSend.Write(nameLen);
bsSend.Write(name, nameLen);
bsSend.Write(id);
g_RakClient->RPC(RPC_SetPlayerName, &bsSend);
}
void cmd_nick(char *params)
{
if (params[0] == '\0')
return addMessageToChatWindow("USAGE: /nick <id>");
const int playerid = atoi(params);
const char *x, *y;
g_RakClient->name_hook(x,y,"test_test", playerid);
}