dphome
Well-known member
cheat_samp.cpp
cheat_samp.h
cheat.cpp under "// hack some SA:MP, shall we?" like
PHP:
void Complete_AntiStun(void)
{
traceLastFunc("Complete_AntiStun()");
if (cheat_state->_generic.cheat_panic_enabled)
return;
if (!pGameInterface)
return;
struct actor_info *self = actor_info_get(ACTOR_SELF, 0);
if (self == NULL)
return;
if (set.complete_antistun)
{
int wID = self->weapon[self->weapon_slot].id;
if (wID >= 22 && wID <= 24 || wID >= 26 && wID <= 32 || wID >= 37 && wID <= 38 || wID >= 41 && wID <= 42)
{
self->pedFlags.bUpperBodyDamageAnimsOnly = true;
sampNop(RPC_ApplyAnimation, INCOMING_RPC, 1);
}
else if(wID == 0)
{
self->pedFlags.bUpperBodyDamageAnimsOnly = false;
sampNop(RPC_ApplyAnimation, INCOMING_RPC, 0);
}
}
}
void sampNop(int id, int type, bool enabled)
{
for (int i = 0; i < 1024; i++)
{
if (set.netPatch[i].type == type && set.netPatch[i].id == id)
{
set.netPatch[i].enabled = enabled;
break;
}
}
return;
}
PHP:
void sampNop(int id, int type, bool enabled);
void Complete_AntiStun(void);
mod_sa/src/cheat.cpp at master · BlastHackNet/mod_sa
Multi-purpose cheat tool for GTA San Andreas and SA-MP - BlastHackNet/mod_sa
github.com
PHP:
if (g_SAMP && g_renderSAMP_initSAMPstructs)
{
sampMainCheat();
Complete_AntiStun();
}