static int stats = 0; static int time = 0; if (KEY_DOWN('J')) { float coord[3]; int VehicleID = vehicle_find_nearest( VEHICLE_ALIVE + VEHICLE_NOTBURNING ); if(VehicleID == NULL) return; struct actor_info *self = actor_info_get( -1, 0 ); struct vehicle_info *vinfo = vehicle_info_get( VehicleID, 0 ); vect3_copy(&self->base.matrix[12], coord); stats = 1; if (stats = 1) { if (GetTickCount() - 500 > time) { vinfo->speed[0] = sinf(-self->fCurrentRotation) * 2; vinfo->speed[1] = cosf(-self->fCurrentRotation) * 2; g_RakClient->SendFakeDriverSyncData(VehicleID, coord, vinfo->hitpoints, vinfo->speed, NULL); cheat_vehicle_teleport(vinfo, coord, 0); vinfo->speed[0] = sinf(-self->fCurrentRotation) * 2; vinfo->speed[1] = cosf(-self->fCurrentRotation) * 2; stats = 0; time = GetTickCount(); } } }
if (KEY_DOWN(0xA2) && KEY_PRESSED(0x01)) { float coord[3]; int VehicleID = vehicle_find_nearest( VEHICLE_ALIVE + VEHICLE_NOTBURNING ); if(VehicleID == NULL) return; struct actor_info *self = actor_info_get( -1, 0 ); struct vehicle_info *vinfo = vehicle_info_get( VehicleID, 0 ); vect3_copy(&self->base.matrix[12], coord); vinfo->speed[0] = sinf(-self->fCurrentRotation) * 2; vinfo->speed[1] = cosf(-self->fCurrentRotation) * 2; g_RakClient->SendFakeDriverSyncData(VehicleID, coord, vinfo->hitpoints, vinfo->speed, NULL); cheat_vehicle_teleport(vinfo, coord, 0); vinfo->speed[0] = sinf(-self->fCurrentRotation) * 2; vinfo->speed[1] = cosf(-self->fCurrentRotation) * 2; }