Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef unsigned int DWORD;
- int ENTITY_LOAD_STUB(int r3, int a);
- int GET_ENTITY_TYPE_STUB(int a1, int a2);
- int EVENT_SPAM_FIX_STUB(int a1, int a2, int a3, int a4);
- int ResurrectPrintStub(int a1, int a2, int a3, int a4, int a5);
- int RemoveAllWeaponsStub(int a1, int a2, int a3, int a4, int a5);
- int RemoveWeaponStub(int a1, int a2, int a3, int a4, int a5);
- int RequestRagdollStub(int a1, int a2, int a3, int a4, int a5);
- int EntityType = -1;
- int Entity_PlayerID = 0;
- bool Block = 0;
- int GET_ENTITY_TYPE(int Entity, int a2)
- {
- EntityType = Entity;
- return GET_ENTITY_TYPE_STUB(Entity, a2);
- }
- int EVENT_SPAM_FIX(int a1, int PlayerID, int a3, int a4)
- {
- Entity_PlayerID = PlayerID;
- if (Block) {
- Block = 0;
- return 0;
- }
- return EVENT_SPAM_FIX_STUB(a1, PlayerID, a3, a4);
- }
- int ResurrectPrint(int a1, int a2, int PlayerID, int a4, int a5)
- {
- char buffer[100];
- sprintf(buffer, "%s Tried To resurrect you", GET_PLAYER_NAME(PlayerID));
- printf("%s\n", buffer);
- print(buffer);
- return ResurrectPrintStub(a1, a2, PlayerID, a4, a5);
- }
- int RemoveAllWeapons(int a1, int a2, int PlayerID, int a4, int a5)
- {
- char buffer[100];
- sprintf(buffer, "%s Tried To Remove All Your Weapons", GET_PLAYER_NAME(PlayerID));
- printf("%s\n", buffer);
- print(buffer);
- return RemoveAllWeaponsStub(a1, a2, PlayerID, a4, a5);
- }
- int RemoveWeapon(int a1, int a2, int PlayerID, int a4, int a5)
- {
- char buffer[100];
- sprintf(buffer, "%s Tried To Remove Your Weapon", GET_PLAYER_NAME(PlayerID));
- printf("%s\n", buffer);
- print(buffer);
- return RemoveWeaponStub(a1, a2, PlayerID, a4, a5);
- }
- int RequestRagdoll(int a1, int a2, int PlayerID, int a4, int a5)
- {
- char buffer[100];
- sprintf(buffer, "%s Tried to ragdoll you", GET_PLAYER_NAME(PlayerID));
- printf("%s\n", buffer);
- print(buffer);
- return RequestRagdollStub(a1, a2, PlayerID, a4, a5);
- }
- int ENTITY_LOAD_HOOK(int key, int a)
- {
- char buffer[100];
- int isNetworkSession = *(int*)(0x10ABE30);
- if (isNetworkSession)
- {
- switch (EntityType)
- {
- case 0:
- break;
- case 1: case 2:
- if (key == MODEL_SUPERLOD || key == MODEL_PLAYER)
- {
- printf("%s Spawned Freeze Ped 0x%X\n", GET_PLAYER_NAME(Entity_PlayerID), key);
- sprintf(buffer, "%s Tried To Spawn A Freeze Ped %X", GET_PLAYER_NAME(Entity_PlayerID));
- print(buffer);
- EntityType = -1;
- Block = 1;
- return -1;
- }
- break;
- case 3:
- break;
- case 4:
- {
- if (IS_THIS_MODEL_A_VEHICLE(key))
- {
- printf("%s Spawned Vehicle Object 0x%X\n", GET_PLAYER_NAME(Entity_PlayerID), key);
- sprintf(buffer, "%s Tried To Spawn A Vehicle Object", GET_PLAYER_NAME(Entity_PlayerID));
- print(buffer);
- EntityType = -1;
- Block = 1;
- return -1;
- }
- else if (key == OBJECT_WS_SUBLIGHT || key == OBJECT_NJ5_FIREPIP02 || key == OBJECT_CJ_WS_T_BASE_DAM || key == OBJECT_SUBLIGHT_MS || key == OBJECT_CJ_WALL_LIGHT_2)
- {
- printf("%s Spawned a lag object\n", GET_PLAYER_NAME(Entity_PlayerID));
- EntityType = -1;
- Block = 1;
- return -1;
- }
- printf("%s Spawned Object %X\n", GET_PLAYER_NAME(Entity_PlayerID), key);
- break;
- }
- case 5:
- if (key == VEHICLE_ANGEL || key == VEHICLE_DAEMON || key == VEHICLE_DIABOLUS
- || key == VEHICLE_INNOVATION || key == VEHICLE_LYCAN || key == VEHICLE_NIGHTBLADE
- || key == VEHICLE_REVENANT || key == VEHICLE_WAYFARER || key == VEHICLE_WOLFSBANE)
- {
- printf("%s Spawned A Freeze Bike 0x%X\n", GET_PLAYER_NAME(Entity_PlayerID), key);
- sprintf(buffer, "%s Tried To Spawn A Freeze Bike", GET_PLAYER_NAME(Entity_PlayerID));
- print(buffer);
- EntityType = -1;
- Block = 1;
- return -1;
- }
- break;
- case 6:
- break;
- case 7:
- if (key != VEHICLE_DINGHY && key != VEHICLE_JETMAX && key != VEHICLE_MARQUIS && key != VEHICLE_PREDATOR
- && key != VEHICLE_REEFER && key != VEHICLE_SQUALO && key != VEHICLE_TROPIC && key != VEHICLE_TUGA
- && key != VEHICLE_BLADE && key != VEHICLE_FLOATER && key != VEHICLE_SMUGGLER)
- {
- printf("%s Spawned A Freeze Boat 0x%X\n", GET_PLAYER_NAME(Entity_PlayerID), key);
- sprintf(buffer, "%s Tried To Spawn A Freeze Boat %X", GET_PLAYER_NAME(Entity_PlayerID), key);
- print(buffer);
- EntityType = -1;
- Block = 1;
- return -1;
- }
- else if (key == VEHICLE_TUGA)
- {
- printf("%s Spawned A Tug\n", GET_PLAYER_NAME(Entity_PlayerID));
- EntityType = -1;
- Block = 1;
- return -1;
- }
- break;
- case 8:
- break;
- case 9:
- break;
- case 10:
- break;
- default:
- break;
- }
- }
- Block = 0;
- EntityType = -1;
- return ENTITY_LOAD_STUB(key, a);
- }
- int GET_ENTITY_TYPE_STUB(int a1, int a2)
- {
- __asm("li 3, 0");
- }
- int ENTITY_LOAD_STUB(int r3, int a)
- {
- __asm("li 3, 0");
- }
- int EVENT_SPAM_FIX_STUB(int a1, int a2, int a3, int a4)
- {
- __asm("li 3, 0");
- }
- int ResurrectPrintStub(int a1, int a2, int a3, int a4, int a5)
- {
- __asm("li 3, 0");
- }
- int RemoveAllWeaponsStub(int a1, int a2, int a3, int a4, int a5)
- {
- __asm("li 3, 0");
- }
- int RemoveWeaponStub(int a1, int a2, int a3, int a4, int a5)
- {
- __asm("li 3, 0");
- }
- int RequestRagdollStub(int a1, int a2, int a3, int a4, int a5)
- {
- __asm("li 3, 0");
- }
- extern "C" int _start()
- {
- *(int*)(0x404508) = 0x60000000; //patch Killzone
- *(int*)(0x4046B0) = 0x60000000; //patch Killzone
- HookFunctionStart(0x828DE0, (DWORD)GET_ENTITY_TYPE_STUB, (DWORD)GET_ENTITY_TYPE);
- HookFunctionStart(0x24FF90, (DWORD)ENTITY_LOAD_STUB, (DWORD)ENTITY_LOAD_HOOK);
- HookFunctionStart(0x83C8A0, (DWORD)EVENT_SPAM_FIX_STUB, (DWORD)EVENT_SPAM_FIX);
- HookFunctionStart(0x7FCD38, (DWORD)ResurrectPrintStub, (DWORD)ResurrectPrint);
- HookFunctionStart(0x7FCA78, (DWORD)RemoveAllWeaponsStub, (DWORD)RemoveAllWeapons);
- HookFunctionStart(0x7FCB28, (DWORD)RemoveWeaponStub, (DWORD)RemoveWeapon);
- HookFunctionStart(0x7FC238, (DWORD)RequestRagdollStub, (DWORD)RequestRagdoll);
- *(int*)(0x3A3CF0) = 0x4E800020; //Remove shadows
- *(int*)(0x3A3F40) = 0x4E800020; //Remove shadows
- *(int*)(0x3A49E0) = 0x4E800020; //Remove shadows
- *(int*)(0x3A4DA8) = 0x4E800020; //Remove shadows
- *(int*)(0x8054B0) = 0x4E800020; //Block Resurrect
- *(int*)(0x807758) = 0x4E800020; //Block remove all weapons
- *(int*)(0x807830) = 0x4E800020; //Block remove weapons
- *(int*)(0x80AC30) = 0x4E800020; //Block give weapons
- *(int*)(0x8009D8) = 0x4E800020; //Block Ragdoll request
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement