Siga-nos em...
Follow us on Twitter Follow us on Facebook Watch us on YouTube
Registro


Alpha Servers
Resultados 1 a 5 de 5
  1. #1

    Avatar de Mr.TwoHam
    Data de Ingresso
    Sep 2009
    Localização
    Microsoft ®
    Idade
    24
    Posts
    629
    Agradecido
    27
    Agradeceu
    19
    Peso da Avaliação
    16

    Padrão Equipar char com 2 armas

    Opa Imperianos ,Blzinha ?

    Hoje Vim Postar uma Source Para Vcs Poderem add no Seu Server ..!

    A Source serve para que o Char Mostre as Duas Armas que Está Usando ..

    Veja o Exemplo :

    [Somente usuários registrados podem vem os links. ]


    Source

    utils.h
    Código:
    #pragma once
    
    #include <windows.h>
    
    //void MsgBox(char *szlog, ...);
    
    DWORD HookThis(DWORD dwMyFuncOffset, DWORD dwJmpOffset);
    void WriteJmp(DWORD dwWriteOffset, DWORD dwDstJmp);
    void WriteCall(DWORD dwWriteOffset, DWORD dwDstJmp);
    
    void SetNop(DWORD dwOffset, int Size);
    void SetRangeNop(DWORD dwStart, DWORD dwEnd);
    void SetRetn(DWORD dwOffset);
    void SetByte(DWORD dwOffset, BYTE btValue);
    void SetDword(DWORD dwOffset, DWORD dwValue);
    DWORD GetDword(DWORD dwOffset);
    
    DWORD UnProtect(DWORD dwAddr, DWORD size);
    void Protect(DWORD dwAddr, DWORD size, DWORD dwProtection);
    BYTE GetByte(DWORD dwOffset)
    utils.cpp
    Código:
    #include "stdafx.h"
    #include "utils.h"
    
    #include <stdio.h>
    #include <stdarg.h>
    
    //void MsgBox(char *szlog, ...)
    //{
    // char szBuffer[512]="";
    // va_list pArguments;
    // va_start(pArguments, szlog);
    // vsprintf(szBuffer, szlog, pArguments);
    // va_end(pArguments);
    // MessageBoxA(NULL, szBuffer, "error", MB_OK|MB_APPLMODAL);
    //}
    
    
    
    DWORD UnProtect(DWORD dwAddr, DWORD size)
    {
    DWORD old = 0;
    VirtualProtect((LPVOID)dwAddr, size, PAGE_EXECUTE_READWRITE, &old);
    // MsgBox("Unable to remove page protection. ERROR: %08X.", GetLastError());
    return old;
    }
    
    void Protect(DWORD dwAddr, DWORD size, DWORD dwProtection)
    {
    DWORD old = 0;
    VirtualProtect((LPVOID)dwAddr, size, dwProtection, &old);
    }
    
    DWORD HookThis(DWORD dwMyFuncOffset, DWORD dwJmpOffset)
    {
    DWORD old = 0;
    __try
    {
    DWORD dwP = UnProtect(dwJmpOffset, 10);
    
    old = *(DWORD*)(dwJmpOffset+1) + dwJmpOffset + 5;
    *(DWORD*)(dwJmpOffset+1) = dwMyFuncOffset - (dwJmpOffset+5);
    
    Protect(dwJmpOffset, 10, dwP);
    }
    __finally{}
    
    return old;
    }
    
    void WriteJmp(DWORD dwWriteOffset, DWORD dwDstJmp)
    {
    if(dwWriteOffset)
    {
    __try
    {
    DWORD dwP = UnProtect(dwWriteOffset, 10);
    
    SetByte(dwWriteOffset, 0xE9);
    HookThis(dwDstJmp, dwWriteOffset);
    
    Protect(dwWriteOffset, 10, dwP);
    }
    __finally{}
    }
    
    }
    
    void WriteCall(DWORD dwWriteOffset, DWORD dwDstJmp)
    {
    __try
    {
    DWORD dwP = UnProtect(dwWriteOffset, 10);
    
    SetByte(dwWriteOffset, 0xE8);
    HookThis(dwDstJmp, dwWriteOffset);
    
    Protect(dwWriteOffset, 10, dwP);
    }
    __finally{}
    
    }
    
    void SetNop(DWORD dwOffset, int Size)
    {
    __try
    {
    DWORD dwP = UnProtect(dwOffset, Size);
    
    for(int n=0; n < Size; n++)
    {
    *(BYTE*)(dwOffset+n) = 0x90;
    }
    
    Protect(dwOffset, Size, dwP);
    }
    __finally{}
    
    }
    
    void SetRangeNop(DWORD dwStart, DWORD dwEnd)
    {
    __try
    {
    DWORD dwP = UnProtect(dwStart, dwEnd - dwStart);
    
    for(int n=dwStart; n < dwEnd; n++)
    {
    *(BYTE*)(n) = 0x90;
    }
    
    Protect(dwStart, dwEnd - dwStart, dwP);
    }
    __finally{}
    }
    
    
    
    void SetRetn(DWORD dwOffset)
    {
    __try
    {
    DWORD dwP = UnProtect(dwOffset, 1);
    
    *(BYTE*)(dwOffset)=0xC3;
    
    Protect(dwOffset, 1, dwP);
    }
    __finally{}
    }
    
    void SetByte(DWORD dwOffset, BYTE btValue)
    {
    __try
    {
    DWORD dwP = UnProtect(dwOffset, 1);
    
    *(BYTE*)(dwOffset)=btValue;
    
    Protect(dwOffset, 1, dwP);
    }
    __finally{}
    }
    
    
    BYTE GetByte(DWORD dwOffset)
    {
    BYTE byVal = 0;
    __try
    {
    DWORD dwP = UnProtect(dwOffset, 1);
    
    byVal = *(BYTE*)(dwOffset);
    
    Protect(dwOffset, 1, dwP);
    }
    __finally{}
    
    return byVal;
    }
    
    
    
    void SetDword(DWORD dwOffset, DWORD dwValue)
    {
    __try
    {
    DWORD dwP = UnProtect(dwOffset, 4);
    
    *(DWORD*)(dwOffset)=dwValue;
    
    Protect(dwOffset, 4, dwP);
    }
    __finally{}
    }
    
    
    DWORD GetDword(DWORD dwOffset)
    {
    DWORD dwVal = 0;
    __try
    {
    DWORD dwP = UnProtect(dwOffset, 4);
    
    dwVal = *(DWORD*)(dwOffset);
    
    Protect(dwOffset, 4, dwP);
    }
    __finally{}
    
    return dwVal;
    }
    stdafx.h
    Código:
    // stdafx.h : include file for standard system include files,
    // or project specific include files that are used frequently, but
    // are changed infrequently
    //
    
    #pragma once
    
    // Modify the following defines if you have to target a platform prior to the ones specified below.
    // Refer to MSDN for the latest info on corresponding values for different platforms.
    #ifndef WINVER // Allow use of features specific to Windows XP or later.
    #define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
    #endif
    
    #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
    #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
    #endif
    
    #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
    #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
    #endif
    
    #ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later.
    #define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE.
    #endif
    
    #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
    // Windows Header Files:
    #include <windows.h>
    
    
    
    // TODO: reference additional headers your program requires here
    stdafx.cpp
    Código:
    // stdafx.cpp : source file that includes just the standard includes
    // WeaponView.pch will be the pre-compiled header
    // stdafx.obj will contain the pre-compiled type information
    
    #include "stdafx.h"
    
    // TODO: reference any additional headers you need in STDAFX.H
    // and not in this file
    WeaponView.cpp
    Código:
    // WeaponView.cpp : Defines the entry point for the DLL application.
    //
    
    #include "stdafx.h"
    #include "utils.h"
    #include "offsets.h"
    
    
    #ifdef _MANAGED
    #pragma managed(push, off)
    #endif
    
    #pragma comment (lib, "kernel32")
    
    void InitDLL();
    
    DWORD SecondWeaponFixVal = 0;
    DWORD IsShield = 0;
    
    BOOL APIENTRY DllMain( HMODULE hModule,
    DWORD ul_reason_for_call,
    LPVOID lpReserved
    )
    {
    switch(ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
    InitDLL();
    break;
    
    }
    return TRUE;
    }
    
    __declspec(naked) void WeaponViewCheck()
    {
    __asm
    {
    
    #ifndef OLD_MAIN
    MOV BYTE PTR SS:[EBP+WeaponViewFlagFixup], 0
    
    CMP DWORD PTR SS:[EBP+SafeZoneFlagFixup], 0
    JE WEAPON_CHECK
    MOV BYTE PTR SS:[EBP+WeaponViewFlagFixup], 1
    
    WEAPON_CHECK:
    
    MOV EAX, DWORD PTR SS:[EBP+8]
    CMP DWORD PTR SS:[EBP+HandFlagFixup], 0
    JNZ LEFT_HAND
    
    
    MOVSX ECX, WORD PTR DS:[EAX+RightHandFixup]
    
    CMP ECX, MAKE_ITEM(7, 0) + OBJ_OFFS
    JGE NO_DISPLAY
    
    CMP ECX, MAKE_ITEM(4, 15) + OBJ_OFFS
    JE DISPLAY_WEAPON
    JMP END_CHECK
    
    LEFT_HAND:
    MOVSX ECX, WORD PTR DS:[EAX+LeftHandFixup]
    
    CMP ECX, MAKE_ITEM(7, 0) + OBJ_OFFS
    JGE NO_DISPLAY
    
    CMP ECX, MAKE_ITEM(4, 7) + OBJ_OFFS
    JE DISPLAY_WEAPON
    JMP END_CHECK
    
    
    DISPLAY_WEAPON:
    MOV BYTE PTR SS:[EBP+WeaponViewFlagFixup], 1
    JMP END_CHECK
    
    NO_DISPLAY:
    MOV BYTE PTR SS:[EBP+WeaponViewFlagFixup], 0
    
    #elif defined OLD_MAIN
    
    
    MOV BYTE PTR SS:[STACK_PTR+WeaponViewFlagFixup], 0
    
    CMP DWORD PTR SS:[STACK_PTR+SafeZoneFlagFixup], 0
    JE WEAPON_CHECK
    MOV BYTE PTR SS:[STACK_PTR+WeaponViewFlagFixup], 1
    
    WEAPON_CHECK:
    
    CMP EAX, 0
    JNZ LEFT_HAND
    
    
    CMP WORD PTR DS:[CHAR_REG+RightHandFixup], MAKE_ITEM(7, 0) + OBJ_OFFS
    JGE NO_DISPLAY
    
    CMP WORD PTR DS:[CHAR_REG+RightHandFixup], MAKE_ITEM(4, 15) + OBJ_OFFS
    JE DISPLAY_WEAPON
    JMP END_CHECK
    
    LEFT_HAND:
    
    
    CMP WORD PTR DS:[CHAR_REG+LeftHandFixup], MAKE_ITEM(7, 0) + OBJ_OFFS
    JGE NO_DISPLAY
    
    CMP WORD PTR DS:[CHAR_REG+LeftHandFixup], MAKE_ITEM(4, 7) + OBJ_OFFS
    JE DISPLAY_WEAPON
    JMP END_CHECK
    
    
    DISPLAY_WEAPON:
    MOV BYTE PTR SS:[STACK_PTR+WeaponViewFlagFixup], 1
    JMP END_CHECK
    
    NO_DISPLAY:
    MOV BYTE PTR SS:[EBP+WeaponViewFlagFixup], 0
    
    
    #else
    
    //check for correct preprocessor definitions
    throw
    
    #endif
    
    END_CHECK:
    
    jmp WeaponViewCheck_Ret
    }
    }
    
    __declspec(naked) void SecondWeaponViewCheck()
    {
    __asm
    {
    #ifndef OLD_MAIN
    
    CMP DWORD PTR SS:[EBP+HandFlagFixup], 0
    JNZ END_CHECK
    
    MOV DWORD PTR SS:[EBP+HandFlagFixup], 1
    MOV SecondWeaponFixVal, 1
    
    #elif defined OLD_MAIN
    
    CMP SecondWeaponFixVal, 0
    JNZ END_CHECK
    
    MOV EAX, 1
    MOV SecondWeaponFixVal, 1
    
    #else
    
    //check for correct preprocessor definitions
    throw
    
    #endif
    
    
    JMP WeaponViewCheck
    
    END_CHECK:
    MOV SecondWeaponFixVal, 0
    jmp SecondWeaponViewCheck_Ret
    }
    }
    
    __declspec(naked) void SecondWeaponViewCheckReplacedCode()
    {
    __asm
    {
    #ifndef OLD_MAIN
    
    MOV EDX, DWORD PTR SS:[EBP+SomeVal1Fixup]
    MOV EAX, DWORD PTR SS:[EBP+SomeVal2Fixup]
    MOV DWORD PTR DS:[EDX+SomeVal3Fixup], EAX
    
    #elif defined OLD_MAIN
    MOV EDX, 0x3E800000
    #else
    throw
    #endif
    JMP SecondWeaponViewCheck
    }
    }
    
    DWORD s_eax, s_ecx, s_edx;
    
    __declspec(naked) void SecondWeaponViewFix()
    {
    __asm
    {
    //MOV EAX, SecondWeaponFixVal
    //XOR DWORD PTR SS:[EBP+RotFixup], EAX
    //XOR DWORD PTR SS:[EBP+TransFixup], EAX
    
    #ifdef OLD_MAIN
    MOV s_eax, EAX
    MOV s_ecx, ECX
    MOV s_edx, EDX
    #endif
    
    MOV IsShield, 0
    
    // check for shield
    CMP WEAPON_ID_CONTAINER, MAKE_ITEM(6, 0) + OBJ_OFFS
    JL FLIP_CHECK
    CMP WEAPON_ID_CONTAINER, MAKE_ITEM(7, 0) + OBJ_OFFS
    JGE FLIP_CHECK
    
    MOV IsShield, 1
    
    CMP WEAPON_ID_CONTAINER, MAKE_ITEM(6, 16) + OBJ_OFFS
    JNZ CHECK_SHIELD_14_15
    
    
    MOV DWORD PTR SS:[STACK_PTR+RotFixup], 0x41F00000
    MOV DWORD PTR SS:[STACK_PTR+RotFixup+4], 0
    MOV DWORD PTR SS:[STACK_PTR+RotFixup+8], 0x42B40000
    LEA EDX, DWORD PTR SS:[STACK_PTR+TransFixup]
    LEA EAX, DWORD PTR SS:[STACK_PTR+RotFixup]
    PUSH EDX
    PUSH EAX
    CALL RotateFunc
    ADD ESP, 8
    MOV DWORD PTR SS:[STACK_PTR+TransFixup+0x0C], 0xC1A00000
    MOV DWORD PTR SS:[STACK_PTR+TransFixup+0x1C], 0
    MOV DWORD PTR SS:[STACK_PTR+TransFixup+0x2C], 0xC1A00000
    
    JMP FLIP_CHECK
    
    
    CHECK_SHIELD_14_15:
    
    CMP WEAPON_ID_CONTAINER, MAKE_ITEM(6, 15) + OBJ_OFFS
    JE SHIELD_14_15
    CMP WEAPON_ID_CONTAINER, MAKE_ITEM(6, 14) + OBJ_OFFS
    JNZ CHECK_SHIELD_6
    
    SHIELD_14_15:
    
    MOV DWORD PTR SS:[STACK_PTR+RotFixup], 0x42480000
    MOV DWORD PTR SS:[STACK_PTR+RotFixup+4], 0
    MOV DWORD PTR SS:[STACK_PTR+RotFixup+8], 0x42B40000
    LEA EDX, DWORD PTR SS:[STACK_PTR+TransFixup]
    LEA EAX, DWORD PTR SS:[STACK_PTR+RotFixup]
    PUSH EDX
    PUSH EAX
    CALL RotateFunc
    ADD ESP, 8
    MOV DWORD PTR SS:[STACK_PTR+TransFixup+0x0C], 0xC1E00000
    MOV DWORD PTR SS:[STACK_PTR+TransFixup+0x1C], 0
    MOV DWORD PTR SS:[STACK_PTR+TransFixup+0x2C], 0xC1C80000
    
    JMP FLIP_CHECK
    
    
    CHECK_SHIELD_6:
    
    CMP WEAPON_ID_CONTAINER, MAKE_ITEM(6, 6) + OBJ_OFFS
    JNZ SET_SHIELD
    
    MOV DWORD PTR SS:[STACK_PTR+RotFixup], 0x41F00000
    MOV DWORD PTR SS:[STACK_PTR+RotFixup+4], 0
    MOV DWORD PTR SS:[STACK_PTR+RotFixup+8], 0x42B40000
    LEA EDX, DWORD PTR SS:[STACK_PTR+TransFixup]
    LEA EAX, DWORD PTR SS:[STACK_PTR+RotFixup]
    PUSH EDX
    PUSH EAX
    CALL RotateFunc
    ADD ESP, 8
    MOV DWORD PTR SS:[STACK_PTR+TransFixup+0x0C], 0xC1700000
    MOV DWORD PTR SS:[STACK_PTR+TransFixup+0x1C], 0
    MOV DWORD PTR SS:[STACK_PTR+TransFixup+0x2C], 0xC1C80000
    
    JMP FLIP_CHECK
    
    
    SET_SHIELD:
    
    
    MOV DWORD PTR SS:[STACK_PTR+TransFixup+0x0C], 0xC1200000
    MOV DWORD PTR SS:[STACK_PTR+TransFixup+0x1C], 0
    MOV DWORD PTR SS:[STACK_PTR+TransFixup+0x2C], 0
    
    
    FLIP_CHECK:
    
    CMP IsShield, 1
    JE EXIT
    
    CMP SecondWeaponFixVal, 0
    JE EXIT
    
    SUB ESP, 0x3C
    #if STACK_PTR == ESP
    #define fixup 0x3C
    #else
    #define fixup 0
    #endif
    MOV DWORD PTR SS:[ESP+0x30], 0x43110000
    MOV DWORD PTR SS:[ESP+0x34], 0
    MOV DWORD PTR SS:[ESP+0x38], 0x43898000
    LEA EAX, DWORD PTR SS:[ESP]
    LEA ECX, DWORD PTR SS:[ESP+0x30]
    PUSH EAX
    PUSH ECX
    CALL RotateFunc
    ADD ESP, 8
    
    MOV DWORD PTR SS:[ESP+0x0C], 0
    MOV DWORD PTR SS:[ESP+0x1C], 0x41200000
    MOV DWORD PTR SS:[ESP+0x2C], 0xC1F00000
    LEA EDX, DWORD PTR SS:[STACK_PTR+TransFixup+fixup]
    LEA EAX, DWORD PTR SS:[ESP]
    LEA ECX, DWORD PTR SS:[STACK_PTR+TransFixup+fixup]
    PUSH EDX
    PUSH EAX
    PUSH ECX
    CALL TransFunc
    
    ADD ESP, 0x48
    
    EXIT:
    
    #ifdef OLD_MAIN
    MOV EAX, s_eax
    MOV ECX, s_ecx
    MOV EDX, s_edx
    #endif
    
    PUSH SomeVal4
    JMP SecondWeaponViewFix_Ret
    }
    }
    
    //DWORD SecondWeaponViewRotFix_Old;
    //DWORD SecondWeaponViewTransFix_Old;
    //
    //__declspec(naked) void SecondWeaponViewRotFix()
    //{
    // __asm
    // {
    // MOV EAX, DWORD PTR SS:[ESP+4]
    // MOV ECX, SecondWeaponFixVal
    // XOR DWORD PTR DS:[EAX+8], ECX
    // JMP SecondWeaponViewRotFix_Old
    // }
    //}
    //
    //__declspec(naked) void SecondWeaponViewTransFix()
    //{
    // __asm
    // {
    // MOV EAX, DWORD PTR SS:[ESP+8]
    // MOV ECX, SecondWeaponFixVal
    // XOR DWORD PTR DS:[EAX+0x0C], ECX
    // JMP SecondWeaponViewTransFix_Old
    // }
    //}
    
    void InitDLL()
    {
    WriteJmp(WeaponViewCheck_Hook, (DWORD)WeaponViewCheck);
    WriteJmp(SecondWeaponViewCheckReplacedCode_Hook, (DWORD)SecondWeaponViewCheckReplacedCode);
    
    HookThis((DWORD)SecondWeaponViewCheck, SecondWeaponViewCheck_Hook1);
    HookThis((DWORD)SecondWeaponViewCheck, SecondWeaponViewCheck_Hook2);
    
    WriteJmp(SecondWeaponViewFix_Hook, (DWORD)SecondWeaponViewFix);
    
    //for(int i=0; i < sizeof(SecondWeaponViewRotFix_Hook)/sizeof(*SecondWeaponViewRotFix_Hook); i++)
    //{
    // SecondWeaponViewRotFix_Old = HookThis((DWORD)SecondWeaponViewRotFix, SecondWeaponViewRotFix_Hook[i]);
    //}
    
    //SecondWeaponViewTransFix_Old = HookThis((DWORD)SecondWeaponViewTransFix, SecondWeaponViewTransFix_Hook);
    }
    
    
    #ifdef _MANAGED
    #pragma managed(pop)
    #endif
    offset.h
    Código:
    #pragma once
    
    
    #ifdef M_104D
    
    #define OBJ_OFFS (0x285)
    
    const int WeaponViewCheck_Hook = 0x5254C3;
    const int WeaponViewCheck_Ret = 0x52561A;
    
    #define RightHandFixup 0x2F0
    #define LeftHandFixup 0x310
    
    #define WeaponViewFlagFixup -0x1A8
    #define HandFlagFixup -0x1B0
    #define SafeZoneFlagFixup -0x5C
    
    
    #define SomeVal1Fixup -0x1BC
    #define SomeVal2Fixup -0x1C0
    #define SomeVal3Fixup 8
    
    const int SecondWeaponViewCheckReplacedCode_Hook = 0x525843;
    
    
    const int SecondWeaponViewCheck_Hook1 = 0x5256D3+1;
    const int SecondWeaponViewCheck_Hook2 = 0x5256E0+1;
    const int SecondWeaponViewCheck_Ret = 0x525852;
    
    const int SecondWeaponViewFix_Hook = 0x51D071;
    const int SecondWeaponViewFix_Ret = 0x51D076;
    #define SomeVal4 0x695B88C
    
    //const int SecondWeaponViewRotFix_Hook[] = {0x51CF67, 0x51CD87, 0x51CDE4, 0x51CED1, 0x51CF31, 0x51CFA4};
    //const int SecondWeaponViewTransFix_Hook = 0x51D097;
    
    
    const int RotateFunc = 0x6F4125;
    const int TransFunc = 0x6F43C1;
    
    #define RotFixup (-0x2B8)
    #define TransFixup (-0x2AC)
    
    
    
    #elif M_102K_J
    
    
    #define OBJ_OFFS (0x27B)
    
    const int WeaponViewCheck_Hook = 0x538EC9;
    const int WeaponViewCheck_Ret = 0x539020;
    
    #define RightHandFixup 0x2F8
    #define LeftHandFixup 0x318
    
    #define WeaponViewFlagFixup -0x1A8
    #define HandFlagFixup -0x1B0
    #define SafeZoneFlagFixup -0x5C
    
    
    #define SomeVal1Fixup -0x1BC
    #define SomeVal2Fixup -0x1C0
    #define SomeVal3Fixup 8
    
    const int SecondWeaponViewCheckReplacedCode_Hook = 0x539249;
    
    
    const int SecondWeaponViewCheck_Hook1 = 0x5390D9+1;
    const int SecondWeaponViewCheck_Hook2 = 0x5390E6+1;
    const int SecondWeaponViewCheck_Ret = 0x539258;
    
    const int SecondWeaponViewFix_Hook = 0x530A5B;
    const int SecondWeaponViewFix_Ret = 0x530A60;
    #define SomeVal4 0x69D9554
    
    //const int SecondWeaponViewRotFix_Hook[] = {0x51CF67, 0x51CD87, 0x51CDE4, 0x51CED1, 0x51CF31, 0x51CFA4};
    //const int SecondWeaponViewTransFix_Hook = 0x51D097;
    
    
    const int RotateFunc = 0x679035;
    const int TransFunc = 0x6792D1;
    
    #define RotFixup (-0x2B8)
    #define TransFixup (-0x2AC)
    
    
    
    #elif M_102C
    
    #define OBJ_OFFS (0x246)
    
    const int WeaponViewCheck_Hook = 0x52C5A7;
    const int WeaponViewCheck_Ret = 0x52C6FE;
    
    #define RightHandFixup 0x2F8
    #define LeftHandFixup 0x318
    
    #define WeaponViewFlagFixup -0x13C
    #define HandFlagFixup -0x144
    #define SafeZoneFlagFixup -0x5C
    
    
    #define SomeVal1Fixup -0x150
    #define SomeVal2Fixup -0x154
    #define SomeVal3Fixup 8
    
    const int SecondWeaponViewCheckReplacedCode_Hook = 0x52C927;
    
    
    const int SecondWeaponViewCheck_Hook1 = 0x52C7B7+1;
    const int SecondWeaponViewCheck_Hook2 = 0x52C7C4+1;
    const int SecondWeaponViewCheck_Ret = 0x52C936;
    
    const int SecondWeaponViewFix_Hook = 0x525482;
    const int SecondWeaponViewFix_Ret = 0x525487;
    #define SomeVal4 0x69A3384
    
    //const int SecondWeaponViewRotFix_Hook[] = {0x51CF67, 0x51CD87, 0x51CDE4, 0x51CED1, 0x51CF31, 0x51CFA4};
    //const int SecondWeaponViewTransFix_Hook = 0x51D097;
    
    
    const int RotateFunc = 0x661735;
    const int TransFunc = 0x6619D1;
    
    #define RotFixup (-0x2B8)
    #define TransFixup (-0x2AC)
    
    #elif M_102K
    
    #define OBJ_OFFS (0x285)
    
    const int WeaponViewCheck_Hook = 0x5254C3;
    const int WeaponViewCheck_Ret = 0x52561A;
    
    #define RightHandFixup 0x2F0
    #define LeftHandFixup 0x310
    
    #define WeaponViewFlagFixup -0x1A8
    #define HandFlagFixup -0x1B0
    #define SafeZoneFlagFixup -0x5C
    
    
    #define SomeVal1Fixup -0x1BC
    #define SomeVal2Fixup -0x1C0
    #define SomeVal3Fixup 8
    
    const int SecondWeaponViewCheckReplacedCode_Hook = 0x525843;
    
    
    const int SecondWeaponViewCheck_Hook1 = 0x5256D3+1;
    const int SecondWeaponViewCheck_Hook2 = 0x5256E0+1;
    const int SecondWeaponViewCheck_Ret = 0x525852;
    
    const int SecondWeaponViewFix_Hook = 0x51D071;
    const int SecondWeaponViewFix_Ret = 0x51D076;
    #define SomeVal4 0x695B88C
    
    //const int SecondWeaponViewRotFix_Hook[] = {0x51CF67, 0x51CD87, 0x51CDE4, 0x51CED1, 0x51CF31, 0x51CFA4};
    //const int SecondWeaponViewTransFix_Hook = 0x51D097;
    
    
    const int RotateFunc = 0x6F4125;
    const int TransFunc = 0x6F43C1;
    
    #define RotFixup (-0x2B8)
    #define TransFixup (-0x2AC)
    
    
    #elif M_104J
    
    #define OBJ_OFFS (0x289)
    
    
    const int WeaponViewCheck_Hook = 0x525BC1;
    const int WeaponViewCheck_Ret = 0x525D18;
    
    #define RightHandFixup 0x2F0
    #define LeftHandFixup 0x310
    
    #define WeaponViewFlagFixup -0x1DC
    #define HandFlagFixup -0x1E4
    #define SafeZoneFlagFixup -0x5C
    
    
    #define SomeVal1Fixup -0x1F0
    #define SomeVal2Fixup -0x1F4
    #define SomeVal3Fixup 8
    
    const int SecondWeaponViewCheckReplacedCode_Hook = 0x525F41;
    
    
    const int SecondWeaponViewCheck_Hook1 = 0x525DD1+1;
    const int SecondWeaponViewCheck_Hook2 = 0x525DDE+1;
    const int SecondWeaponViewCheck_Ret = 0x525F50;
    
    const int SecondWeaponViewFix_Hook = 0x51D071;
    const int SecondWeaponViewFix_Ret = 0x51D076;
    #define SomeVal4 0x695CA2C
    
    //const int SecondWeaponViewRotFix_Hook[] = {0x51CF67, 0x51CD87, 0x51CDE4, 0x51CED1, 0x51CF31, 0x51CFA4};
    //const int SecondWeaponViewTransFix_Hook = 0x51D097;
    
    
    const int RotateFunc = 0x6F59F5;
    const int TransFunc = 0x6F5C91;
    
    #define RotFixup (-0x2B8)
    #define TransFixup (-0x2AC)
    
    #elif M_105H
    
    
    #define OBJ_OFFS (0x325)
    
    const int WeaponViewCheck_Hook = 0x4EA4FA;
    const int WeaponViewCheck_Ret = 0x4EA598;
    
    #define RightHandFixup 0x180
    #define LeftHandFixup 0x1A0
    
    #define WeaponViewFlagFixup -0x244
    #define HandFlagFixup -0x24C
    #define SafeZoneFlagFixup -0x5C
    
    
    #define SomeVal1Fixup -0x258
    #define SomeVal2Fixup -0x25C
    #define SomeVal3Fixup 8
    
    const int SecondWeaponViewCheckReplacedCode_Hook = 0x4EA860;
    
    
    const int SecondWeaponViewCheck_Hook1 = 0x4EA64B+1;
    const int SecondWeaponViewCheck_Hook2 = 0x4EA658+1;
    const int SecondWeaponViewCheck_Ret = 0x4EA86F;
    
    const int SecondWeaponViewFix_Hook = 0x4DF49B;
    const int SecondWeaponViewFix_Ret = 0x4DF4A0;
    #define SomeVal4 0x6A2D648
    
    //const int SecondWeaponViewRotFix_Hook[] = {0x51CF67, 0x51CD87, 0x51CDE4, 0x51CED1, 0x51CF31, 0x51CFA4};
    //const int SecondWeaponViewTransFix_Hook = 0x51D097;
    
    
    const int RotateFunc = 0x6A9865;
    const int TransFunc = 0x6A9B01;
    
    #define RotFixup (-0xB0)
    #define TransFixup (-0xA4)
    
    
    #elif M_105K
    
    #define OBJ_OFFS (0x325)
    
    const int WeaponViewCheck_Hook = 0x4EA53A;
    const int WeaponViewCheck_Ret = 0x4EA5D8;
    
    #define RightHandFixup 0x180
    #define LeftHandFixup 0x1A0
    
    #define WeaponViewFlagFixup -0x244
    #define HandFlagFixup -0x24C
    #define SafeZoneFlagFixup -0x5C
    
    
    #define SomeVal1Fixup -0x258
    #define SomeVal2Fixup -0x25C
    #define SomeVal3Fixup 8
    
    const int SecondWeaponViewCheckReplacedCode_Hook = 0x4EA8A0;
    
    
    const int SecondWeaponViewCheck_Hook1 = 0x4EA68B+1;
    const int SecondWeaponViewCheck_Hook2 = 0x4EA698+1;
    const int SecondWeaponViewCheck_Ret = 0x4EA8AF;
    
    const int SecondWeaponViewFix_Hook = 0x4DF4DB;
    const int SecondWeaponViewFix_Ret = 0x4DF4E0;
    #define SomeVal4 0x6A2E648
    
    //const int SecondWeaponViewRotFix_Hook[] = {0x51CF67, 0x51CD87, 0x51CDE4, 0x51CED1, 0x51CF31, 0x51CFA4};
    //const int SecondWeaponViewTransFix_Hook = 0x51D097;
    
    
    const int RotateFunc = 0x6A9AA5;
    const int TransFunc = 0x6A9D41;
    
    #define RotFixup (-0xB0)
    #define TransFixup (-0xA4)
    
    
    #elif M_300E
    
    #define OBJ_OFFS (0x325)
    
    
    const int WeaponViewCheck_Hook = 0x4EA285;
    const int WeaponViewCheck_Ret = 0x4EA323;
    
    #define RightHandFixup 0x180
    #define LeftHandFixup 0x1A0
    
    #define WeaponViewFlagFixup -0x244
    #define HandFlagFixup -0x24C
    #define SafeZoneFlagFixup -0x5C
    
    
    #define SomeVal1Fixup -0x258
    #define SomeVal2Fixup -0x25C
    #define SomeVal3Fixup 8
    
    const int SecondWeaponViewCheckReplacedCode_Hook = 0x4EA5EB;
    
    
    const int SecondWeaponViewCheck_Hook1 = 0x4EA3D6+1;
    const int SecondWeaponViewCheck_Hook2 = 0x4EA3E3+1;
    const int SecondWeaponViewCheck_Ret = 0x4EA5FA;
    
    const int SecondWeaponViewFix_Hook = 0x4DF226;
    const int SecondWeaponViewFix_Ret = 0x4DF22B;
    #define SomeVal4 0x6A30C88
    
    //const int SecondWeaponViewRotFix_Hook[] = {0x51CF67, 0x51CD87, 0x51CDE4, 0x51CED1, 0x51CF31, 0x51CFA4};
    //const int SecondWeaponViewTransFix_Hook = 0x51D097;
    
    
    const int RotateFunc = 0x6A7F45;
    const int TransFunc = 0x6A81E1;
    
    #define RotFixup (-0xB0)
    #define TransFixup (-0xA4)
    
    
    #elif M_097D
    
    #define OBJ_OFFS (0x190)
    
    const int WeaponViewCheck_Hook = 0x456E14;
    const int WeaponViewCheck_Ret = 0x456EAA;
    
    #define RightHandFixup 0x270
    #define LeftHandFixup 0x288
    
    #define WeaponViewFlagFixup +0x98
    //#define HandFlagFixup -0x1B0
    #define SafeZoneFlagFixup +0x18
    
    
    //#define SomeVal1Fixup -0x1BC
    //#define SomeVal2Fixup -0x1C0
    //#define SomeVal3Fixup 8
    
    const int SecondWeaponViewCheckReplacedCode_Hook = 0x456FA7;
    
    
    const int SecondWeaponViewCheck_Hook1 = 0x456F05+1;
    const int SecondWeaponViewCheck_Hook2 = 0x456F0E+1;
    const int SecondWeaponViewCheck_Ret = 0x456FAC;
    
    const int SecondWeaponViewFix_Hook = 0x454477;
    const int SecondWeaponViewFix_Ret = 0x45447C;
    #define SomeVal4 0x6EFE300
    
    //const int SecondWeaponViewRotFix_Hook[] = {0x51CF67, 0x51CD87, 0x51CDE4, 0x51CED1, 0x51CF31, 0x51CFA4};
    //const int SecondWeaponViewTransFix_Hook = 0x51D097;
    
    
    const int RotateFunc = 0x4F5340;
    const int TransFunc = 0x4F5500;
    
    #define RotFixup (+0x20)
    #define TransFixup (+0x58)
    
    
    
    #define OLD_MAIN
    
    #define STACK_PTR ESP
    #define CHAR_REG EBX
    #define WEAPON_ID_CONTAINER EBX
    
    #endif
    
    
    
    #ifdef OLD_MAIN
    #define MAX_ITEM (32)
    #else
    #define MAX_ITEM (512)
    #define STACK_PTR EBP
    #define WEAPON_ID_CONTAINER DWORD PTR SS:[EBP+0x1C]
    #endif
    
    
    #define MAKE_ITEM(type, index) (type*MAX_ITEM + index)

    Qualquer Duvida de como Criar a dll , mande um MP ou poste aqui que eu Ajudo a Resolver ..!
    Créditos

    *Gembrid
    Última edição por Mr.TwoHam; 13-10-2009 às 02:53 PM.

  2. #2


    Avatar de chris05
    Data de Ingresso
    Sep 2009
    Localização
    Sem informações
    Idade
    61
    Posts
    1.667
    Agradecido
    48
    Agradeceu
    32
    Peso da Avaliação
    36

    Padrão

    O autor do tópico NÃO colocou para que versão de client foi montada essa source.

    Mas quem estiver interessado e realmente prestar atenção, verá que a source é para os mains 1.04D, 102K_J, 102C, 102K, 104J, 105H, 105K, 300E, 097D.

    Assim sendo, mensagens perguntando para que versão é essa DLL serão deletadas e os usuários punidos de acordo com as regras.
    CAMPANHA: VAMOS UTILIZAR O BCC PARA REPASSAR UM EMAIL PARA TODOS OS NOSSOS CONTATOS... VAMOS GARANTIR A SEGURANÇA DE CADA UM, BEM COMO SUA PRIVACIDADE...

  3. #3

    Avatar de M4f10u5
    Data de Ingresso
    Oct 2009
    Idade
    24
    Posts
    29
    Agradecido
    0
    Agradeceu
    0
    Peso da Avaliação
    0

    Padrão

    Como faço pra dar hook? as configs como é?

  4. #4

    Avatar de LKTeaM
    Data de Ingresso
    Nov 2011
    Localização
    Jacareí
    Idade
    26
    Posts
    105
    Agradecido
    3
    Agradeceu
    3
    Peso da Avaliação
    8

    Padrão

    @chris05 vc diz que "a source é para os mains 1.04D, 102K_J, 102C, 102K, 104J, 105H, 105K, 300E, 097D." mais e para as versões 1.01e e 1.02t também funciona?? a 1.02t creio que sim por que é uma das varias mix da 1.02 não é, mas e a 1.01e?????

    @Mr.TwoHam poderia ajudar a como criar a .dll?? muita gente poderá ter esse problema inclusive eu tenho ^^... poderia postar um tutorial ou fazer uma video? se sim grato ^^

    LKTeaM

  5. #5

    Avatar de usabr
    Data de Ingresso
    Mar 2012
    Localização
    casa
    Posts
    116
    Agradecido
    5
    Agradeceu
    5
    Peso da Avaliação
    7

    Padrão

    Erro ao copilar.... veja log de erros:
    Compiling...
    utils.cpp
    c:\program files\microsoft visual studio 8\vc\include\stdio.h(32) : error C2144: syntax error : 'int' should be preceded by ';'
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(22) : warning C4312: 'type cast' : conversion from 'DWORD' to 'LPVOID' of greater size
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(30) : warning C4312: 'type cast' : conversion from 'DWORD' to 'LPVOID' of greater size
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(40) : warning C4312: 'type cast' : conversion from 'DWORD' to 'DWORD *' of greater size
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(41) : warning C4312: 'type cast' : conversion from 'DWORD' to 'DWORD *' of greater size
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(91) : warning C4312: 'type cast' : conversion from 'DWORD' to 'BYTE *' of greater size
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(106) : warning C4018: '<' : signed/unsigned mismatch
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(108) : warning C4312: 'type cast' : conversion from 'int' to 'BYTE *' of greater size
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(124) : warning C4312: 'type cast' : conversion from 'DWORD' to 'BYTE *' of greater size
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(137) : warning C4312: 'type cast' : conversion from 'DWORD' to 'BYTE *' of greater size
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(152) : warning C4312: 'type cast' : conversion from 'DWORD' to 'BYTE *' of greater size
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(169) : warning C4312: 'type cast' : conversion from 'DWORD' to 'DWORD *' of greater size
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(184) : warning C4312: 'type cast' : conversion from 'DWORD' to 'DWORD *' of greater size
    WeaponView.cpp
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\weaponview.cpp(6) : fatal error C1083: Cannot open include file: 'offsets.h': No such file or directory
    Generating Code...

    Quando mudei de offset.h para offsets.h deu isso:


    Compiling...
    utils.cpp
    c:\program files\microsoft visual studio 8\vc\include\stdio.h(32) : error C2144: syntax error : 'int' should be preceded by ';'
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(22) : warning C4312: 'type cast' : conversion from 'DWORD' to 'LPVOID' of greater size
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(30) : warning C4312: 'type cast' : conversion from 'DWORD' to 'LPVOID' of greater size
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(40) : warning C4312: 'type cast' : conversion from 'DWORD' to 'DWORD *' of greater size
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(41) : warning C4312: 'type cast' : conversion from 'DWORD' to 'DWORD *' of greater size
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(91) : warning C4312: 'type cast' : conversion from 'DWORD' to 'BYTE *' of greater size
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(106) : warning C4018: '<' : signed/unsigned mismatch
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(108) : warning C4312: 'type cast' : conversion from 'int' to 'BYTE *' of greater size
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(124) : warning C4312: 'type cast' : conversion from 'DWORD' to 'BYTE *' of greater size
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(137) : warning C4312: 'type cast' : conversion from 'DWORD' to 'BYTE *' of greater size
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(152) : warning C4312: 'type cast' : conversion from 'DWORD' to 'BYTE *' of greater size
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(169) : warning C4312: 'type cast' : conversion from 'DWORD' to 'DWORD *' of greater size
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\utils.cpp(184) : warning C4312: 'type cast' : conversion from 'DWORD' to 'DWORD *' of greater size
    WeaponView.cpp
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\weaponview.cpp(15) : error C2144: syntax error : 'void' should be preceded by ';'
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\weaponview.cpp(209) : error C2415: improper operand type
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\weaponview.cpp(211) : error C2415: improper operand type
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\weaponview.cpp(216) : error C2415: improper operand type
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\weaponview.cpp(238) : error C2415: improper operand type
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\weaponview.cpp(240) : error C2415: improper operand type
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\weaponview.cpp(263) : error C2415: improper operand type
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\weaponview.cpp(367) : error C2065: 'WeaponViewCheck_Hook' : undeclared identifier
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\weaponview.cpp(367) : warning C4311: 'type cast' : pointer truncation from 'void (__cdecl *)(void)' to 'DWORD'
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\weaponview.cpp(368) : error C2065: 'SecondWeaponViewCheckReplacedCode_Hook' : undeclared identifier
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\weaponview.cpp(368) : warning C4311: 'type cast' : pointer truncation from 'void (__cdecl *)(void)' to 'DWORD'
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\weaponview.cpp(370) : warning C4311: 'type cast' : pointer truncation from 'void (__cdecl *)(void)' to 'DWORD'
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\weaponview.cpp(370) : error C2065: 'SecondWeaponViewCheck_Hook1' : undeclared identifier
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\weaponview.cpp(371) : warning C4311: 'type cast' : pointer truncation from 'void (__cdecl *)(void)' to 'DWORD'
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\weaponview.cpp(371) : error C2065: 'SecondWeaponViewCheck_Hook2' : undeclared identifier
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\weaponview.cpp(373) : error C2065: 'SecondWeaponViewFix_Hook' : undeclared identifier
    c:\users\douglas\documents\visual studio 2005\projects\2armas\2armas\weaponview.cpp(373) : warning C4311: 'type cast' : pointer truncation from 'void (__cdecl *)(void)' to 'DWORD'
    Generating Code...
    Results

    Build log was saved at "file://c:\Users\Douglas\Documents\Visual Studio 2005\Projects\2armas\2armas\Debug\BuildLog.htm"
    2armas - 13 error(s), 17 warning(s)

 

 

Informações de Tópico

Usuários Navegando neste Tópico

Há 1 usuários navegando neste tópico. (0 registrados e 1 visitantes)

Tópicos Similares

  1. |Tutorial| Gun Emporium - Forjador de Armas
    Por SHIP no fórum Combat Arms
    Respostas: 0
    Último Post: 07-11-2012, 11:08 AM
  2. |Skin| novas armas
    Por levelx no fórum Skins
    Respostas: 2
    Último Post: 23-03-2012, 11:51 PM
  3. |Tutorial| Kit+armas
    Por borecho no fórum Counter Strike
    Respostas: 0
    Último Post: 17-09-2010, 07:35 PM
  4. |Resolvido| Query para resetar os char perder os itens do char!
    Por kelvin no fórum Tópicos resolvidos
    Respostas: 5
    Último Post: 04-02-2010, 01:48 PM

Marcadores

Permissões de Postagem

  • Você não pode iniciar novos tópicos
  • Você não pode enviar respostas
  • Você não pode enviar anexos
  • Você não pode editar suas mensagens
  •