Can someone explain to me how it's done on ps3 I've been trying and I haven't got it??
void WeatherEventProtection(int r3, int r4, int r5, int r6, int r7, int r8) {
int* iArgs = (int*)(r3 + 0x24);
char* sName = (char*)(*(DWORD*)(r4 + 0x78) + 0x5C);
MapNotificationDouble("tried to change the weather!", sName);
*(int*)0x835DB068 = 0x60000000;
((DWORD(*)(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD)) 0x830D8178)(r3, r4, r5, r6, r7, r8);
*(int*)0x835DB068 = 0x4E800421;
}
void ProtectionsLoop() {
CEventTable(0x83C8686C, 0x19).DetourEvent(0x830D9E90, (int)ScriptEventProtection);
CEventTable(0x83C8686C, 0x21).DetourEvent(0x830DAB60, (int)AnimationProtection);
CEventTable(0x83C8686C, 0xA).DetourEvent(0x830D8178, (int)WeatherEventProtection);
CEventTable(0x83C8686C, 0xD).DetourEvent(0x830D84F8, (int)RemoveWeaponProtection);
CEventTable(0x83C8686C, 0xE).DetourEvent(0x830D8600, (int)RemoveAllWeaponsProtection);
CEventTable(0x83C8686C, 0x27).DetourEvent(0x830DB100, (int)ClearTasksProtection);
CEventTable(0x83C8686C, 0x9).DetourEvent(0x830D80B8, (int)TimeEventProtection);
CEventTable(0x83C8686C, 0x44).DetourEvent(0x830DEB58, (int)ParticleFXProtection);
}
void WeatherEventProtection(int r3, int r4, int r5, int r6, int r7, int r8) {
int* iArgs = (int*)(r3 + 0x24);
char* sName = (char*)(*(DWORD*)(r4 + 0x78) + 0x5C);
MapNotificationDouble("tried to change the weather!", sName);
*(int*)0x835DB068 = 0x60000000;
((DWORD(*)(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD)) 0x830D8178)(r3, r4, r5, r6, r7, r8);
*(int*)0x835DB068 = 0x4E800421;
}
void ProtectionsLoop() {
CEventTable(0x83C8686C, 0x19).DetourEvent(0x830D9E90, (int)ScriptEventProtection);
CEventTable(0x83C8686C, 0x21).DetourEvent(0x830DAB60, (int)AnimationProtection);
CEventTable(0x83C8686C, 0xA).DetourEvent(0x830D8178, (int)WeatherEventProtection);
CEventTable(0x83C8686C, 0xD).DetourEvent(0x830D84F8, (int)RemoveWeaponProtection);
CEventTable(0x83C8686C, 0xE).DetourEvent(0x830D8600, (int)RemoveAllWeaponsProtection);
CEventTable(0x83C8686C, 0x27).DetourEvent(0x830DB100, (int)ClearTasksProtection);
CEventTable(0x83C8686C, 0x9).DetourEvent(0x830D80B8, (int)TimeEventProtection);
CEventTable(0x83C8686C, 0x44).DetourEvent(0x830DEB58, (int)ParticleFXProtection);
}