You don't have to detour the send function, if you do, you also have to patch the hackshield or it will be detected.
For the format thingy, it's va_arg function. Possible formats are:
U -> DWORD (not required)
b -> BYTE
w -> WORD
d -> DWORD
s -> STRING
m -> DWORD
So: PacketType (BYTE), Format (String), va_args
You can call it like this:
Code:
__declspec(naked) int __cdecl mysend (BYTE type , LPCSTR format , ... )
{
__asm
{
push ebp
mov ebp, esp
sub esp, 0x18
jmp sendadr
}
}
Example (teleport to cop)
mysend(0x30,"ww",4,6002);