нападающий ID

Неадекватная сова

Известный
Проверенный
208
146
You need hook outcoming RPC GiveTakeDamage (115)

SAMPFUNCS sample:

C++:
bool CALLBACK outcomingRPC(stRakNetHookParams * params)
{
    if (params->packetId == RPCEnumeration::RPC_GiveTakeDamage)
    {
        bool type;
        WORD playerID;
        float damage;
        int gun, bodyID;

        params->bitStream->ResetReadPointer();
        params->bitStream->Read(type);
        params->bitStream->Read(playerID);
        params->bitStream->Read(damage);
        params->bitStream->Read(gun);
        params->bitStream->Read(bodyID);

        if (playerID > SAMP_MAX_PLAYERS) { return true; }
        if (gun > 46) { return true; }

        if (type) {
            //Your code
        }
    };
    return true;
}
 
  • Нравится
Реакции: _=Gigant=_

Pu$$y

Участник
Автор темы
80
2
You need hook outcoming RPC GiveTakeDamage (115)

SAMPFUNCS sample:

C++:
bool CALLBACK outcomingRPC(stRakNetHookParams * params)
{
    if (params->packetId == RPCEnumeration::RPC_GiveTakeDamage)
    {
        bool type;
        WORD playerID;
        float damage;
        int gun, bodyID;

        params->bitStream->ResetReadPointer();
        params->bitStream->Read(type);
        params->bitStream->Read(playerID);
        params->bitStream->Read(damage);
        params->bitStream->Read(gun);
        params->bitStream->Read(bodyID);

        if (playerID > SAMP_MAX_PLAYERS) { return true; }
        if (gun > 46) { return true; }

        if (type) {
            //Your code
        }
    };
    return true;
}
Thanks for the help. But how Can I say his ID in the chat? So basically, When I get hit, I say the player's ID in the chat. How can I do that? Thanks again

Any help?

Any help?