Beispiel #1
0
void CPedSync::Packet_PedStopSync ( NetBitStreamInterface& BitStream )
{
    // Read out the ped id
    ElementID ID;
    if ( BitStream.Read ( ID ) )
    {
        // Grab the ped
        CClientPed* pPed = static_cast < CClientPed* > ( m_pPedManager->Get ( ID ) );
        if ( pPed )
        {
            // Lock health and armour
            pPed->LockHealth ( pPed->GetHealth() );
            pPed->LockArmor ( pPed->GetArmor() );

            // Stop syncing it
            RemovePed ( pPed );
        }
    }
}