
12.11.2018, 19:14
|
|
Новичок
Регистрация: 31.07.2013
Сообщений: 12
С нами:
6727803
Репутация:
51
|
|
////
#define SAMP_FUNC_RESTARTGAME 0xA060
/////
if (KEYCOMBO_PRESSED(set.key_rejoin))
{
disconnect(0);
restartGame();
cheat_state_text("Реконнект через %d секунд...", set.rejoin_delay / 1000);
cheat_state->_generic.rejoinTick = GetTickCount();
}
/////////////////////////
void restartGame()
{
if (g_SAMP == NULL)
return;
((void(__thiscall *) (void *)) (g_dwSAMP_Addr + SAMP_FUNC_RESTARTGAME)) (g_SAMP);
}
//////////
uint32_t samp_dll = getSampAddress();
g_dwSAMP_Addr = (uint32_t) samp_dll;
uint32_t getSampAddress()
{
if (set.run_mode == RUNMODE_SINGLEPLAYER)
return 0x0;
uint32_t samp_dll;
if (set.run_mode == RUNMODE_SAMP)
{
if (set.wine_compatibility)
{
samp_dll = (uint32_t) LoadLibrary(SAMP_DLL);
}
else
{
samp_dll = (uint32_t) dll_baseptr_get(SAMP_DLL);
}
}
return samp_dll;
}
////////
|
|
|