В Samp.cpp
Код
if( cheat_state->_generic.house == 1 )
{
for (int i = 0; i < SAMP_PICKUP_MAX; i++)
{
if (g_SAMP->pPools->pPool_Pickup->pickup[i].iModelID == 1273)
{
struct actor_info *self = actor_info_get( ACTOR_SELF, 0 );
float Pos[3];
vect3_copy( g_SAMP->pPools->pPool_Pickup->pickup[i].fPosition, Pos );
if ( vect3_near_zero(Pos) )
continue;
if ( vect3_dist( Pos, &self->base.matrix[4 * 3] ) > 150.0 )
continue;
if ( cheat_state->state == CHEAT_STATE_VEHICLE ) GTAfunc_RemoveActorFromCarAndPutAt(Pos);
else cheat_actor_teleport(self, Pos, 0);
cheat_state->_generic.house = 0;
}
}
}
В cheat.h
Ко всем struct cheat_state_generic
В new_menu.cpp
Код
TwAddVarRW(twBar_SPNew, "HouseChecker", TW_TYPE_BOOLCPP, &cheat_state->_generic.house, " label='HouseChecker' group='HouseChecker' ");