/*************************************************************** * SetHealth (int pIndex, int pHealth) * * @param pIndex Index of player you wish to set health of * @param pHealth How much health they should have. * * Based on Code By CoolPete http://sourceplugins.com/viewtopic.php?t=3809 * You are my hero, thank you again. (~KinkyMunkey) ****************************************************************/ void cssrpg_ModCompatibility::SetHealth(int pIndex, int pHealth) { // GetBaseEntity CBaseEntity *pBase = CRPG_Utils::s_engine()->PEntityOfEntIndex(pIndex)->GetUnknown()->GetBaseEntity(); // GetHealth //iHealth = *(int*)((char*)pBase + iHealthOffset) // SetHealth *(int*)((char*)pBase + iHealthOffset) = pHealth; return ; }