void toggleSAMPCursor(int iToggle)
{
static int last_state = -1;
if (g_Input == NULL) return;
if (g_Input->iInputEnabled) return;
if (last_state == iToggle) return;
last_state = iToggle;
void* obj = *(void**)(g_dwSAMP_Addr + SAMPOffsets[SAMP_MISC_INFO]);
((void(__thiscall*) (void*, int, bool)) (g_dwSAMP_Addr + SAMPOffsets[SAMP_FUNC_TOGGLECURSOR]))(obj, iToggle ? 3 : 0, !iToggle);
if (!iToggle && SAMPOffsets[SAMP_FUNC_CURSORUNLOCKACTORCAM])
((void(__thiscall*) (void*)) (g_dwSAMP_Addr + SAMPOffsets[SAMP_FUNC_CURSORUNLOCKACTORCAM]))(obj);
}