Skip to content

SendFormatMessage(ToAll) #12

@martonp96

Description

@martonp96

native SendFormatMessage(playerid, color, const message[], {Float,}:...);
native SendFormatMessageToAll(color, const message[], {Float,
}:...);

I think its very useful in this plugin, and comfortable with using RPC.

RakSamp-ból másoltam, szerintem ez az :d

void SendClientMessage(PLAYERID playerID, DWORD dwColor, char* szMessage, ...)
{
va_list va;
va_start(va, szMessage);
char szBuffer[512] = { 0 };
vsprintf(szBuffer, szMessage, va);
va_end(va);

RakNet::BitStream bsParams;
DWORD dwStrLen = strlen(szBuffer);

bsParams.Write(dwColor);
bsParams.Write(dwStrLen);
bsParams.Write(szBuffer, dwStrLen);
pRakServer->RPC(&RPC_ClientMessage, &bsParams, HIGH_PRIORITY, RELIABLE,
    0, pRakServer->GetPlayerIDFromIndex(playerID), FALSE, FALSE, UNASSIGNED_NETWORK_ID, NULL);

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions